You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the create table script for postgres, for a table with a primary key it generates two queries: (1) the overall create table query and (2) the create primary key constraint on the table.
This is done somewhat for simplicity's sake in getting things to work as expected under postgres 8, but it creates a worse user experience for it compared to the other database adapters which just generate one query. As such, the postgres create table script function should be reworked so that it outputs one query again while still being postgres 8 (and redshift) compatible. Accomplishing this should be fairly easily doable by instead of appending ALTER TABLE statements, instead append the table constraints to the create table script after the column definitions. For example, take:
For the create table script for postgres, for a table with a primary key it generates two queries: (1) the overall create table query and (2) the create primary key constraint on the table.
This is done somewhat for simplicity's sake in getting things to work as expected under postgres 8, but it creates a worse user experience for it compared to the other database adapters which just generate one query. As such, the postgres create table script function should be reworked so that it outputs one query again while still being postgres 8 (and redshift) compatible. Accomplishing this should be fairly easily doable by instead of appending
ALTER TABLE
statements, instead append the table constraints to the create table script after the column definitions. For example, take:and adjust it so that it instead does:
The text was updated successfully, but these errors were encountered: