mix ecto.extract.migrations (ecto_extract_migrations v0.1.0) View Source
Mix task to create Ecto migration files from database schema SQL file.
Command line options
--sql-file
- Schema SQL file--repo
- Name of Ecto repo, default Repo--migrations-path
- target dir for migrations, default "priv/repo/migrations".
Usage
pg_dump --schema-only --no-owner postgres://dbuser:dbpassword@localhost/dbname > dbname.schema.sql
mix ecto.extract.migrations --sql-file dbname.schema.sql