defmodule DaProductApp.Repo.Migrations.CreateChains do
  use Ecto.Migration

  def up do
    execute("""
    CREATE TABLE chains (
      id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
      code VARCHAR(255) NOT NULL,
      name VARCHAR(255) NOT NULL,
      inserted_at DATETIME NOT NULL,
      updated_at DATETIME NOT NULL
    ) ENGINE=InnoDB
    """)
  end

  def down do
    execute("DROP TABLE IF EXISTS chains")
  end
end
