0fc9f9d3e7
DB schema generated by a migration may look different in rails 4 and 5 (because rails 5 may use different default values). For this reason it's important to explicitly set for which rails version a migration was written for. See https://stackoverflow.com/questions/35929869/activerecordmigration-deprecation-warning-asks-for-rails-version-but-im-no/35930912#35930912
20 lines
484 B
Ruby
20 lines
484 B
Ruby
class CreateCiPipelineVariables < ActiveRecord::Migration[4.2]
|
|
DOWNTIME = false
|
|
|
|
def up
|
|
create_table :ci_pipeline_variables do |t|
|
|
t.string :key, null: false
|
|
t.text :value
|
|
t.text :encrypted_value
|
|
t.string :encrypted_value_salt
|
|
t.string :encrypted_value_iv
|
|
t.integer :pipeline_id, null: false
|
|
end
|
|
|
|
add_index :ci_pipeline_variables, [:pipeline_id, :key], unique: true
|
|
end
|
|
|
|
def down
|
|
drop_table :ci_pipeline_variables
|
|
end
|
|
end
|