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

Link to this section Summary

Link to this section Functions

Link to this function

alter_sequence_type(map)

View Source
Link to this function

column_set_default(data, defaults)

View Source
Link to this function

column_set_pk(column, pk)

View Source
Link to this function

get_table_constraints(arg1)

View Source
Link to this function

table_set_default(data, defaults)

View Source