Skip to content

Instantly share code, notes, and snippets.

@paulosuzart
Created February 7, 2018 21:32
Show Gist options
  • Save paulosuzart/eb859d41193a683df09e2091d5644a79 to your computer and use it in GitHub Desktop.
Save paulosuzart/eb859d41193a683df09e2091d5644a79 to your computer and use it in GitHub Desktop.
Migration umable to be run
class CreateUsers::V20180206211408 < LuckyMigrator::Migration::V1
def migrate
create :users do
add name : String
add age : Int32?
end
# Run custom SQL with execute
#
# execute "CREATE UNIQUE INDEX things_title_index ON things (title);"
end
def rollback
drop :users
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment