View Source ExDbmigrate (ex_dbmigrate v1.1.3)

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_schema_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 CatalogMeta catalog_metas key:string data:string product_id:integer",
 "mix phx.gen.html CatalogVideosToProducts CatalogVideosToProduct catalog_videos_to_product product_id:integer video_id:integer",
 "mix phx.gen.html CatalogProducts CatalogProduct catalog_products name:string",
 "mix phx.gen.html CatalogVideos CatalogVideo catalog_videos path:string"
]

Generate schema from config.

examples

Examples

iex> ExDbmigrate.json()
["mix phx.gen.json CatalogMetas CatalogMeta catalog_metas key:string data:string product_id:integer",
"mix phx.gen.json CatalogVideosToProducts CatalogVideosToProduct catalog_videos_to_product product_id:integer video_id:integer",
"mix phx.gen.json CatalogProducts CatalogProduct catalog_products name:string",
"mix phx.gen.json CatalogVideos CatalogVideo catalog_videos path:string"]
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 CatalogMeta catalog_metas key:string data:string product_id:integer",
"mix phx.gen.live CatalogVideosToProducts CatalogVideosToProduct catalog_videos_to_product product_id:integer video_id:integer",
"mix phx.gen.live CatalogProducts CatalogProduct catalog_products name:string",
"mix phx.gen.live CatalogVideos CatalogVideo catalog_videos path:string"]

Generate migration from config.

examples

Examples

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

Generate migration from config.

examples

Examples

iex> ExDbmigrate.migration_relations()
["mix phx.gen.schema CatalogMetas CatalogMeta catalog_metas product_id:references:catalog_products",
"mix phx.gen.schema CatalogVideosToProducts CatalogVideosToProduct catalog_videos_to_product product_id:references:catalog_products video_id:references:catalog_videos",
"mix phx.gen.schema CatalogProducts CatalogProduct catalog_products ",
"mix phx.gen.schema CatalogVideos CatalogVideo catalog_videos "]

Generate schema from config.

examples

Examples

iex> ExDbmigrate.schema()
["mix phx.gen.schema CatalogMetas CatalogMeta catalog_metas key:string data:string product_id:integer --no-migration",
"mix phx.gen.schema CatalogVideosToProducts CatalogVideosToProduct catalog_videos_to_product product_id:integer video_id:integer --no-migration",
"mix phx.gen.schema CatalogProducts CatalogProduct catalog_products name:string --no-migration",
"mix phx.gen.schema CatalogVideos CatalogVideo catalog_videos path:string --no-migration"]
Link to this function

table_name(migration_name)

View Source