Sha256: 386ac86a99a4810d08747dfae77b413c6aa2907a10d635975f810a9fb2d349ab

Contents?: true

Size: 1.28 KB

Versions: 75

Compression:

Stored size: 1.28 KB

Contents

# frozen_string_literal: true

class CreateDecidimConsultationsQuestions < ActiveRecord::Migration[5.1]
  def change
    create_table :decidim_consultations_questions do |t|
      t.references :decidim_consultation, index: { name: "index_consultations_questions_on_consultation_id" }
      t.references :decidim_scope

      t.jsonb :title, null: false
      t.jsonb :subtitle, null: false
      t.jsonb :what_is_decided, null: false
      t.jsonb :promoter_group, null: false
      t.jsonb :participatory_scope, null: false
      t.jsonb :question_context

      # Text search indexes for consultation questions.
      t.index :title, name: "consultation_questions_title_search"
      t.index :subtitle, name: "consultation_questions_subtitle_search"
      t.index :what_is_decided, name: "consultation_questions_what_is_decided_search"
      t.index :promoter_group, name: "consultation_question_promoter_group_search"
      t.index :participatory_scope, name: "consultation_question_participatory_scope_search"
      t.index :question_context, name: "consultation_question_context_search"

      t.string :banner_image
      t.string :introductory_video_url
      t.string :reference
      t.string :hashtag

      # Publicable
      t.datetime :published_at, index: true

      t.timestamps
    end
  end
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
decidim-consultations-0.26.1 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.26.0 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.26.0.rc2 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.26.0.rc1 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.25.2 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.25.1 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.25.0 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.25.0.rc4 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.25.0.rc3 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.25.0.rc2 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.25.0.rc1 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.24.3 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.23.6 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.24.2 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.23.5 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.24.1 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.24.0 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.24.0.rc2 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.23.4 db/migrate/20180112053247_create_decidim_consultations_questions.rb
decidim-consultations-0.24.0.rc1 db/migrate/20180112053247_create_decidim_consultations_questions.rb