Skip to content

Instantly share code, notes, and snippets.

@shahryarjb
Created November 29, 2018 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shahryarjb/6d7ffaecaa45bd3b32764172e8986956 to your computer and use it in GitHub Desktop.
Save shahryarjb/6d7ffaecaa45bd3b32764172e8986956 to your computer and use it in GitHub Desktop.
defmodule WeddingCard.Repo.Migrations.WeddingCardCategory do
use Ecto.Migration
@disable_ddl_transaction true
def change do
create table(:wedding_card_category, primary_key: false) do
add :id, :uuid, primary_key: true
add :title, :string, size: 100, null: false
add :short_description, :text, null: false
add :pic_one_link, :string, null: false
add :seo_alias_link, :string, null: false
add :seo_words, :string, null: false
add :seo_description, :string, null: false
add :pic_one_two, :string, null: false
add :description, :text, null: false
add :text_link, :string, null: false
timestamps()
end
# create index("wedding_card_category", [:seo_alias_link], name: :index_of_card_alias_link, unique: true)
create(
index(:wedding_card_category, [:seo_alias_link],
concurrently: true,
name: :index_of_card_alias_link,
unique: true
)
)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment