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

Empty CREATE TABLE statement breaks the migration #140

Open
fero8 opened this issue Jul 28, 2014 · 2 comments
Open

Empty CREATE TABLE statement breaks the migration #140

fero8 opened this issue Jul 28, 2014 · 2 comments

Comments

@fero8
Copy link

fero8 commented Jul 28, 2014

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.

@joelvh
Copy link

joelvh commented Apr 7, 2017

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

@fero8
Copy link
Author

fero8 commented Apr 10, 2017

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

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

2 participants