Sha256: e96646a501d2096d7956b06b8d86a9a584dda347e9783253bcb2d13c718225e9

Contents?: true

Size: 1.16 KB

Versions: 75

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true

class CreateDecidimConsultations < ActiveRecord::Migration[5.1]
  def change
    create_table :decidim_consultations do |t|
      t.string :slug, null: false
      t.integer :decidim_organization_id,
                foreign_key: true,
                index: {
                  name: "index_decidim_consultations_on_decidim_organization_id"
                }

      t.index [:decidim_organization_id, :slug],
              name: "index_unique_consultation_slug_and_organization",
              unique: true

      t.jsonb :title, null: false
      t.jsonb :subtitle, null: false
      t.jsonb :description, null: false

      # Text search indexes for consultations.
      t.index :title, name: "decidim_consultations_title_search"
      t.index :subtitle, name: "decidim_consultations_subtitle_search"
      t.index :description, name: "decidim_consultations_description_search"

      t.string :banner_image
      t.string :introductory_video_url
      t.date :start_voting_date, null: false
      t.integer :decidim_highlighted_scope_id, index: true

      # 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.15.0 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.14.4 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.14.3 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.14.2 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.14.1 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.13.1 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.12.2 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.13.0 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.12.1 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.13.0.pre1 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.12.0 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.11.2 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.12.0.pre db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.11.1 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.11.0.pre1 db/migrate/20180109092205_create_decidim_consultations.rb