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.
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
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/node/commen...