View Source ExDbmigrate (ex_dbmigrate v1.1.1)

Documentation for ExDbmigrate.

Link to this section Summary

Link to this section Functions

Link to this function

generate_htmls_command(data, list)

View Source
Link to this function

generate_jsons_command(data, list)

View Source
Link to this function

generate_lives_command(data, list)

View Source
Link to this function

generate_migration_command(data, list)

View Source
Link to this function

generate_migration_relations_command(fk_data, list)

View Source
Link to this function

generate_schemas_command(data, list)

View Source

Generate schema from config.

examples

Examples

iex> ExDbmigrate.html()
["mix phx.gen.html CatalogMetas catalog_metas  key:string data:string product_id:integer inserted_at:naive_datetime updated_at:naive_datetime",
 "mix phx.gen.html CatalogVideosToProduct catalog_videos_to_product  product_id:integer video_id:integer",
 "mix phx.gen.html CatalogProducts catalog_products  name:string inserted_at:naive_datetime updated_at:naive_datetime",
 "mix phx.gen.html CatalogVideos catalog_videos  path:string inserted_at:naive_datetime updated_at:naive_datetime"
]

Generate schema from config.

examples

Examples

iex> ExDbmigrate.json()
["mix phx.gen.json CatalogMetas catalog_metas  key:string data:string product_id:integer inserted_at:naive_datetime updated_at:naive_datetime",
 "mix phx.gen.json CatalogVideosToProduct catalog_videos_to_product  product_id:integer video_id:integer",
 "mix phx.gen.json CatalogProducts catalog_products  name:string inserted_at:naive_datetime updated_at:naive_datetime",
 "mix phx.gen.json CatalogVideos catalog_videos  path:string inserted_at:naive_datetime updated_at:naive_datetime"
]
Link to this function

list_foreign_keys(table)

View Source

List the foreign keys for specified table.

examples

Examples

iex> ExDbmigrate.list_foreign_keys("catalog_metas")
[%{column_name: "product_id", constraint_name: "catalog_metas_product_id_fkey", foreign_column_name: "id", foreign_table_name: "catalog_products", foreign_table_schema: "public", table_name: "catalog_metas", table_schema: "public"}
]

Generate schema from config.

examples

Examples

iex> ExDbmigrate.live()
["mix phx.gen.live CatalogMetas catalog_metas  key:string data:string product_id:integer inserted_at:naive_datetime updated_at:naive_datetime",
 "mix phx.gen.live CatalogVideosToProduct catalog_videos_to_product  product_id:integer video_id:integer",
 "mix phx.gen.live CatalogProducts catalog_products  name:string inserted_at:naive_datetime updated_at:naive_datetime",
 "mix phx.gen.live CatalogVideos catalog_videos  path:string inserted_at:naive_datetime updated_at:naive_datetime"
]

Generate migration from config.

examples

Examples

iex> ExDbmigrate.migration()
["mix phx.gen.migration CatalogMetas catalog_metas  key:string data:string product_id:integer inserted_at:naive_datetime updated_at:naive_datetime",
  "mix phx.gen.migration CatalogVideosToProduct catalog_videos_to_product  product_id:integer video_id:integer",
  "mix phx.gen.migration CatalogProducts catalog_products  name:string inserted_at:naive_datetime updated_at:naive_datetime",
  "mix phx.gen.migration CatalogVideos catalog_videos  path:string inserted_at:naive_datetime updated_at:naive_datetime"
]

Generate migration from config.

examples

Examples

iex> ExDbmigrate.migration_relations()
["mix phx.gen.migration CatalogMetasRelations catalog_metasrelations product_id:references:catalog_products",
 "mix phx.gen.migration CatalogVideosToProductRelations catalog_videos_to_productrelations product_id:references:catalog_products video_id:references:catalog_videos",
 "mix phx.gen.migration CatalogProductsRelations catalog_productsrelations ",
 "mix phx.gen.migration CatalogVideosRelations catalog_videosrelations "
]

Generate schema from config.

examples

Examples

iex> ExDbmigrate.schema()
["mix phx.gen.schema CatalogMetas catalog_metas  key:string data:string product_id:integer inserted_at:naive_datetime updated_at:naive_datetime --no-migration",
 "mix phx.gen.schema CatalogVideosToProduct catalog_videos_to_product  product_id:integer video_id:integer --no-migration",
 "mix phx.gen.schema CatalogProducts catalog_products  name:string inserted_at:naive_datetime updated_at:naive_datetime --no-migration",
 "mix phx.gen.schema CatalogVideos catalog_videos  path:string inserted_at:naive_datetime updated_at:naive_datetime --no-migration"
]