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.26.1 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.26.0 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.26.0.rc2 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.26.0.rc1 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.25.2 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.25.1 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.25.0 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.25.0.rc4 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.25.0.rc3 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.25.0.rc2 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.25.0.rc1 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.24.3 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.23.6 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.24.2 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.23.5 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.24.1 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.24.0 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.24.0.rc2 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.23.4 db/migrate/20180109092205_create_decidim_consultations.rb
decidim-consultations-0.24.0.rc1 db/migrate/20180109092205_create_decidim_consultations.rb