Skip to content

Added 2 new tasks for importing and exporting sql dump files. #216

Merged
paulcsmith merged 12 commits intomasterfrom
features/168
Sep 13, 2019
Merged

Added 2 new tasks for importing and exporting sql dump files. #216
paulcsmith merged 12 commits intomasterfrom
features/168

Conversation

@jwoertink
Copy link
Member

@jwoertink jwoertink commented Aug 16, 2019

Fixes #168

This adds in 2 new tasks.

  • lucky db.schema.restore path/to/sql_dump.sql
  • lucky db.schema.dump

These allow you to task a sql dump file and import your schema in the case you don't have migration files to run. Or you can create a dump file from your current schema that you can use to import later.

Copy link
Member

@paulcsmith paulcsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good so far. Can you ping me when you've got the spec ready to go?

@jwoertink
Copy link
Member Author

oh yeah, what did you want to do about that? Should I just get specs running outside of Docker? Or should I update the Dockerfile to install the latest pg client stuff?

@paulcsmith
Copy link
Member

@jwoertink Whichever is easiest. If you wanna remove Docker and just use Crystal on Travis then I'm cool with that too!

Copy link
Member

@paulcsmith paulcsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small comments. So stoked for this. This will be super helpful when migrations start getting huge. You can just dump the structure. Delete the migrations and start new migrations from that point on (at least I think that'll work)

Copy link
Member

@paulcsmith paulcsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small comment! Looks awesome

Copy link
Member

@paulcsmith paulcsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome! And nice find. I forgot about with_cleanup :P

@paulcsmith paulcsmith merged commit e197d27 into master Sep 13, 2019
@paulcsmith paulcsmith deleted the features/168 branch September 13, 2019 20:48
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

Successfully merging this pull request may close these issues.

Add new tasks for importing and exporting schema

2 participants