Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Knex and .alterTable and .raw Not Recognized
Post Body

I'm a little baffled as to why knex doesn't recognize the .schema.alterTable .

TypeError: Cannot read properties of undefined (reading 'alterTable') at exports.up (/home/sandbox/repos/knex-demo/knex/migrations/20230904210123_first-migration.js:25:4)

To top it off, the migration returns successful.

I tried the knex1.raw('ALTER TABLE....') call, but raw() and .schema.raw() aren't recognized either??? I feel like I am missing the obvious.

Edit: here's knex documentation: https://knexjs.org/guide/schema-builder.html#altertable

Also edit: Code is here: https://pastebin.com/hfUZfgws

Author
Account Strength
100%
Account Age
9 years
Verified Email
Yes
Verified Flair
No
Total Karma
18,957
Link Karma
2,534
Comment Karma
16,329
Profile updated: 6 days ago
Posts updated: 11 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago