diff --git a/db/migrate/20231006120421_create_decidim_templates.decidim_templates.rb b/db/migrate/20231006120421_create_decidim_templates.decidim_templates.rb new file mode 100644 index 0000000..1eac5dd --- /dev/null +++ b/db/migrate/20231006120421_create_decidim_templates.decidim_templates.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true +# This migration comes from decidim_templates (originally 20200518093819) + +class CreateDecidimTemplates < ActiveRecord::Migration[5.2] + def change + create_table :decidim_templates_templates do |t| + t.integer :decidim_organization_id, null: false, index: { name: "index_decidim_templates_organization" } + t.references :templatable, polymorphic: true, index: { name: "index_decidim_templates_templatable" } + t.jsonb :name, null: false + t.jsonb :description + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 5e8a7b0..7ecfeaf 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2023_10_05_094634) do +ActiveRecord::Schema.define(version: 2023_10_06_120421) do # These are extensions that must be enabled in order to support this database enable_extension "ltree" @@ -1637,6 +1637,18 @@ t.index ["reset_password_token"], name: "index_decidim_system_admins_on_reset_password_token", unique: true end + create_table "decidim_templates_templates", force: :cascade do |t| + t.integer "decidim_organization_id", null: false + t.string "templatable_type" + t.bigint "templatable_id" + t.jsonb "name", null: false + t.jsonb "description" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["decidim_organization_id"], name: "index_decidim_templates_organization" + t.index ["templatable_type", "templatable_id"], name: "index_decidim_templates_templatable" + end + create_table "decidim_term_customizer_constraints", force: :cascade do |t| t.bigint "decidim_organization_id", null: false t.string "subject_type"