Skip to content

Commit

Permalink
Add template module
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagemaru committed Feb 28, 2023
1 parent f3393c1 commit c2c2462
Show file tree
Hide file tree
Showing 5 changed files with 297 additions and 712 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ gem 'decidim', DECIDIM_VERSION
gem 'decidim-conferences', DECIDIM_VERSION
gem 'decidim-initiatives', DECIDIM_VERSION
gem 'decidim-proposals', DECIDIM_VERSION
gem 'decidim-templates', DECIDIM_VERSION

gem 'decidim-antivirus', github: 'puzzle/decidim-module-antivirus'
gem 'decidim-decidim_awesome', github: 'Platoniq/decidim-module-decidim_awesome'
Expand Down
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,7 @@ DEPENDENCIES
decidim-navigation_maps (~> 1.3.0)
decidim-proposals (= 0.26.1)
decidim-question_captcha!
decidim-templates (= 0.26.1)
decidim-term_customizer!
delayed_job_active_record
execjs
Expand Down
Original file line number Diff line number Diff line change
@@ -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
14 changes: 13 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2022_12_05_120000) do
ActiveRecord::Schema.define(version: 2023_02_28_141848) do

# These are extensions that must be enabled in order to support this database
enable_extension "ltree"
Expand Down Expand Up @@ -1782,6 +1782,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"
Expand Down
Loading

0 comments on commit c2c2462

Please sign in to comment.