Closed jdearing-neudesic closed 3 years ago
I'm sorry, but I'm having a bit of trouble understanding this. The YAML shows a sequence named AnswerChoice_id_seq
with an owner table of answerchoice
, but this is followed by a table named foo
whose PK column id
is generated based on a sequence named survey.foo_id_seq
. It seems you tried to replace some names but missed a couple?
Also, you say the ALTER SEQUENCE
should come before CREATE TABLE
, but that is exactly what the generated SQL shows.
@jmafc I apologize. I want ALTER SEQUENCE to come AFTER the CREATE TABLE so it will run.
I wat trying to sanitize my actual schema and failed. As such I went and created a new database with a new schema caleld mins
and created **actually validated and tested`` YAML and SQL. The issue has been updated.
Wait a second now its producing the alter afterwards. I will close this and reopen if I can produce a complete example where the alter happens out of sequence.
I created a yaml file via
dbtoyaml
and it has a schema and two tables like so:The
ALTER SEQUENCE
should come AFTERCREATE TABLE
or else it wont run.