defmodule DaProductApp.Repo.Migrations.CreateSoftwares do use Ecto.Migration def up do execute(""" CREATE TABLE softwares ( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, slug VARCHAR(255) NOT NULL UNIQUE, last_updated DATETIME, inserted_at DATETIME NOT NULL, updated_at DATETIME NOT NULL ) ENGINE=InnoDB """) end def down do execute("DROP TABLE IF EXISTS softwares") end end