Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

knex.schema.createTableLike(...).toSQL() does not have a toNative() method. #5369

Open
kitsunde opened this issue Oct 26, 2022 · 0 comments
Open

Comments

@kitsunde
Copy link

Environment

Knex version: 2.3.0
Database + version: Redshift

Bug

knex.schema.createTableLike('foo', 'bar').toSQL().toNative()

Uncaught:
TypeError: knex.schema.createTableLike(...).toSQL(...).toNative is not a function

We are only using knex to build queries during a migration phase, and was expecting toNative to run bound statements. Instead, we will use toString() to run it as raw SQL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant