17 lines
329 B
Crystal
17 lines
329 B
Crystal
class CreateTags::V00000000000005 < Avram::Migrator::Migration::V1
|
|
def migrate
|
|
create table_for(Tag) do
|
|
primary_key id : Int64
|
|
|
|
add_belongs_to namespace : TagNamespace, on_delete: :restrict
|
|
|
|
add name : String
|
|
add description : String?
|
|
end
|
|
end
|
|
|
|
def rollback
|
|
drop table_for(Tag)
|
|
end
|
|
end
|