|
| 1 | +# frozen_string_literal: true |
| 2 | + |
| 3 | +# This migration comes from decidim_conferences (originally 20180626151505) |
| 4 | +class AddConferences < ActiveRecord::Migration[5.2] |
| 5 | + def change |
| 6 | + create_table :decidim_conferences do |t| |
| 7 | + t.jsonb :title, null: false |
| 8 | + t.jsonb :slogan, null: false |
| 9 | + t.string :slug, null: false |
| 10 | + t.string :hashtag |
| 11 | + t.string :reference |
| 12 | + t.string :location |
| 13 | + t.integer :decidim_organization_id, |
| 14 | + foreign_key: true, |
| 15 | + index: { name: "index_decidim_conferences_on_decidim_organization_id" } |
| 16 | + |
| 17 | + t.jsonb :short_description, null: false |
| 18 | + t.jsonb :description, null: false |
| 19 | + t.string :hero_image |
| 20 | + t.string :banner_image |
| 21 | + t.boolean :promoted, default: false |
| 22 | + t.datetime :published_at |
| 23 | + t.jsonb :objectives, null: false |
| 24 | + t.boolean :show_statistics, default: false |
| 25 | + t.date :start_date |
| 26 | + t.date :end_date |
| 27 | + t.boolean :scopes_enabled, null: false, default: true |
| 28 | + t.integer :decidim_scope_id |
| 29 | + |
| 30 | + t.boolean :registrations_enabled, null: false, default: false |
| 31 | + t.integer :available_slots, null: false, default: 0 |
| 32 | + t.jsonb :registration_terms |
| 33 | + |
| 34 | + t.index [:decidim_organization_id, :slug], |
| 35 | + name: "index_unique_conference_slug_and_organization", |
| 36 | + unique: true |
| 37 | + |
| 38 | + t.timestamps |
| 39 | + end |
| 40 | + end |
| 41 | +end |
0 commit comments