defmodule DaProductApp.Repo.Migrations.CreateAddresses do use Ecto.Migration def up do execute(""" CREATE TABLE addresses ( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, line1 VARCHAR(255) NOT NULL, line2 VARCHAR(255), line3 VARCHAR(255), line4 VARCHAR(255), city VARCHAR(255) NOT NULL, state VARCHAR(255) NOT NULL, country VARCHAR(255) NOT NULL, zipcode 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 addresses") end end