View Source ExDbmigrate (ex_dbmigrate v1.1.3)
Documentation for ExDbmigrate
.
Link to this section Summary
Functions
Generate schema from config.
Generate schema from config.
List the foreign keys for specified table.
Generate schema from config.
Generate migration from config.
Generate migration from config.
Generate schema from config.
Link to this section Functions
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"]
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"]