Sha256: 2a8e3b81eed37bb7f6773ac258cb90d76723f56cb5fdb5b26815c0d17b0873d5

Contents?: true

Size: 1.27 KB

Versions: 88

Compression:

Stored size: 1.27 KB

Contents

# frozen_string_literal: true

# Migration that creates the decidim_initiatives table
class CreateDecidimInitiatives < ActiveRecord::Migration[5.1]
  def change
    create_table :decidim_initiatives do |t|
      t.jsonb :title, null: false
      t.jsonb :description, null: false

      t.integer :decidim_organization_id,
                foreign_key: true,
                index: {
                  name: "index_decidim_initiatives_on_decidim_organization_id"
                }

      # Text search indexes for initiatives.
      t.index :title, name: "decidim_initiatives_title_search"
      t.index :description, name: "decidim_initiatives_description_search"

      t.references :decidim_author, index: true
      t.string :banner_image

      # Publicable
      t.datetime :published_at, index: true

      # Scopeable
      t.integer :decidim_scope_id, index: true

      t.references :type, index: true
      t.integer :state, null: false, default: 0
      t.integer :signature_type, null: false, default: 0
      t.date :signature_start_time, null: false
      t.date :signature_end_time, null: false
      t.jsonb :answer
      t.datetime :answered_at, index: true
      t.string :answer_url
      t.integer :initiative_votes_count, null: false, default: 0

      t.timestamps
    end
  end
end

Version data entries

88 entries across 88 versions & 1 rubygems

Version Path
decidim-initiatives-0.29.1 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.28.4 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.27.9 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.29.0 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.28.3 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.27.8 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.29.0.rc4 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.29.0.rc3 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.29.0.rc2 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.29.0.rc1 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.28.2 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.27.7 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.28.1 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.27.6 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.26.10 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.26.9 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.28.0 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.27.5 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.28.0.rc5 db/migrate/20170906094044_create_decidim_initiatives.rb
decidim-initiatives-0.28.0.rc4 db/migrate/20170906094044_create_decidim_initiatives.rb