taps icon indicating copy to clipboard operation
taps copied to clipboard

Empty CREATE TABLE statement breaks the migration

Open fero8 opened this issue 11 years ago • 2 comments

I.e. this structure in the source Postgres DB:

CREATE TABLE t_add_inf_value (

) WITH ( OIDS=FALSE );

will give an error during Schema creation (but will continue):

`/Library/Ruby/Gems/2.0.0/gems/taps-0.3.24/lib/taps/schema.rb:63:in `block in load': undefined method `apply' for nil:NilClass (NoMethodError)
    from /Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:76:in `connect'
    from /Library/Ruby/Gems/2.0.0/gems/sequel-3.20.0/lib/sequel/core.rb:119:in `connect'
    from /Library/Ruby/Gems/2.0.0/gems/taps-0.3.24/lib/taps/schema.rb:61:in `load'
    from /Library/Ruby/Gems/2.0.0/gems/taps-0.3.24/bin/schema:44:in `<main>'`

Therefore, migration fails during data import since the table does not exist in the target schema.

fero8 avatar Jul 28 '14 09:07 fero8

@fero8 is the schema file you specified a Ruby migration or a SQL script?

joelvh avatar Apr 07 '17 16:04 joelvh

Not exactly sure, this was a long time ago. It was a simple PG to MySQL database export as I recall.

fero8 avatar Apr 10 '17 09:04 fero8