debian-mirror-gitlab/db/migrate/20200731085019_create_experiment.rb
2020-10-24 23:57:45 +05:30

26 lines
456 B
Ruby

# frozen_string_literal: true
class CreateExperiment < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
unless table_exists?(:experiments)
create_table :experiments do |t|
t.text :name, null: false
t.index :name, unique: true
end
end
add_text_limit :experiments, :name, 255
end
def down
drop_table :experiments
end
end