View Source ExDbmigrate (ex_dbmigrate v1.1.2)
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 catalog_metass key:string data:string product_id:integer inserted_at:naive_datetime updated_at:naive_datetime",
"mix phx.gen.html CatalogVideosToProduct catalog_videos_to_products product_id:integer video_id:integer",
"mix phx.gen.html CatalogProducts catalog_productss name:string inserted_at:naive_datetime updated_at:naive_datetime",
"mix phx.gen.html CatalogVideos catalog_videoss 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_metass key:string data:string product_id:integer inserted_at:naive_datetime updated_at:naive_datetime",
"mix phx.gen.json CatalogVideosToProduct catalog_videos_to_products product_id:integer video_id:integer",
"mix phx.gen.json CatalogProducts catalog_productss name:string inserted_at:naive_datetime updated_at:naive_datetime",
"mix phx.gen.json CatalogVideos catalog_videoss path:string inserted_at:naive_datetime updated_at:naive_datetime"
]
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_metass key:string data:string product_id:integer inserted_at:naive_datetime updated_at:naive_datetime",
"mix phx.gen.live CatalogVideosToProduct catalog_videos_to_products product_id:integer video_id:integer",
"mix phx.gen.live CatalogProducts catalog_productss name:string inserted_at:naive_datetime updated_at:naive_datetime",
"mix phx.gen.live CatalogVideos catalog_videoss path:string inserted_at:naive_datetime updated_at:naive_datetime"
]
Generate migration from config.
examples
Examples
iex> ExDbmigrate.migration()
["mix phx.gen.schema CatalogMetas catalog_metass key:string data:string product_id:integer inserted_at:naive_datetime updated_at:naive_datetime",
"mix phx.gen.schema CatalogVideosToProduct catalog_videos_to_products product_id:integer video_id:integer",
"mix phx.gen.schema CatalogProducts catalog_productss name:string inserted_at:naive_datetime updated_at:naive_datetime",
"mix phx.gen.schema CatalogVideos catalog_videoss path:string inserted_at:naive_datetime updated_at:naive_datetime"
]
Generate migration from config.
examples
Examples
iex> ExDbmigrate.migration_relations()
["mix phx.gen.schema CatalogMetasRelations catalog_metasrelations product_id:references:catalog_products",
"mix phx.gen.schema CatalogVideosToProductRelations catalog_videos_to_productrelations product_id:references:catalog_products video_id:references:catalog_videos",
"mix phx.gen.schema CatalogProductsRelations catalog_productsrelations ",
"mix phx.gen.schema CatalogVideosRelations catalog_videosrelations "
]
Generate schema from config.
examples
Examples
iex> ExDbmigrate.schema()
["mix phx.gen.schema CatalogMetas catalog_metass 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_products product_id:integer video_id:integer --no-migration",
"mix phx.gen.schema CatalogProducts catalog_productss name:string inserted_at:naive_datetime updated_at:naive_datetime --no-migration",
"mix phx.gen.schema CatalogVideos catalog_videoss path:string inserted_at:naive_datetime updated_at:naive_datetime --no-migration"
]