Files
grecia/db/migrate/20161220120037_create_legislation_questions.rb
Julian Herrero 65c30c8d2d Remove migrations warning
DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration
is deprecated. Please specify the Rails release the migration was
written for:

class MigrationClass < ActiveRecord::Migration[4.2]

(called from require at bin/rails:4)
2019-04-17 17:40:56 +02:00

24 lines
588 B
Ruby

class CreateLegislationQuestions < ActiveRecord::Migration[4.2]
def change
create_table :legislation_questions do |t|
t.references :legislation_process, index: true
t.text :title
t.integer :answers_count, default: 0
t.datetime :hidden_at, index: true
t.timestamps null: false
end
create_table :legislation_question_options do |t|
t.references :legislation_question, index: true
t.string :value
t.integer :answers_count, default: 0
t.datetime :hidden_at, index: true
t.timestamps null: false
end
end
end