podemos-info/participa2

View on GitHub
db/migrate/20180903101124_add_content_blocks.decidim.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

# This migration comes from decidim (originally 20180724103814)

class AddContentBlocks < ActiveRecord::Migration[5.2]
  def change
    create_table :decidim_content_blocks do |t|
      t.integer :decidim_organization_id, null: false, index: true
      t.string :manifest_name, null: false, index: true
      t.string :scope, null: false, index: true
      t.jsonb :options
      t.datetime :published_at, index: true
      t.integer :weight
      t.references
    end

    add_index(
      :decidim_content_blocks,
      [:decidim_organization_id, :scope, :manifest_name],
      unique: true,
      name: "idx_dcdm_content_blocks_uniq_org_id_scope_manifest_name"
    )
  end
end