-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,172 additions
and
0 deletions.
There are no files selected for viewing
1,065 changes: 1,065 additions & 0 deletions
1,065
app/views/static/api/docs/object/component/index.html
Large diffs are not rendered by default.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
db/migrate/20240626202507_create_decidim_awesome_config.decidim_decidim_awesome.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from decidim_decidim_awesome (originally 20200324170000) | ||
|
||
class CreateDecidimAwesomeConfig < ActiveRecord::Migration[5.2] | ||
def change | ||
create_table :decidim_awesome_config do |t| | ||
t.jsonb :var | ||
t.jsonb :value | ||
t.integer :decidim_organization_id, | ||
foreign_key: true, | ||
index: { name: "index_decidim_awesome_on_decidim_organization_id" } | ||
|
||
t.timestamps | ||
t.index [:var, :decidim_organization_id], name: "index_decidim_awesome_organization_var", unique: true | ||
end | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
db/migrate/20240626202508_create_awesome_editor_images.decidim_decidim_awesome.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from decidim_decidim_awesome (originally 20200324230936) | ||
|
||
class CreateAwesomeEditorImages < ActiveRecord::Migration[5.2] | ||
def change | ||
create_table :decidim_awesome_editor_images do |t| | ||
t.string :image | ||
t.string :path | ||
t.references :decidim_author, null: false, foreign_key: { to_table: :decidim_users }, index: { name: "decidim_awesome_editor_images_author" } | ||
t.references :decidim_organization, null: false, foreign_key: true, index: { name: "decidim_awesome_editor_images_constraint_organization" } | ||
|
||
t.timestamps | ||
end | ||
end | ||
end |
14 changes: 14 additions & 0 deletions
14
...grate/20240626202509_create_decidim_awesome_config_constraints.decidim_decidim_awesome.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from decidim_decidim_awesome (originally 20200403142257) | ||
|
||
class CreateDecidimAwesomeConfigConstraints < ActiveRecord::Migration[5.2] | ||
def change | ||
create_table :decidim_awesome_config_constraints do |t| | ||
t.jsonb :settings | ||
|
||
t.references :decidim_awesome_config, null: false, foreign_key: { to_table: :decidim_awesome_config }, index: { name: "decidim_awesome_config_constraints_config" } | ||
t.timestamps | ||
t.index [:settings, :decidim_awesome_config_id], name: "index_decidim_awesome_settings_awesome_config", unique: true | ||
end | ||
end | ||
end |
13 changes: 13 additions & 0 deletions
13
db/migrate/20240626202510_change_awesome_config_var_type.decidim_decidim_awesome.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from decidim_decidim_awesome (originally 20210628150825) | ||
|
||
class ChangeAwesomeConfigVarType < ActiveRecord::Migration[5.2] | ||
def change | ||
change_column :decidim_awesome_config, :var, :string | ||
|
||
Decidim::DecidimAwesome::AwesomeConfig.find_each do |config| | ||
config.var.gsub!('"', "") | ||
config.save! | ||
end | ||
end | ||
end |
14 changes: 14 additions & 0 deletions
14
db/migrate/20240626202511_create_decidim_awesome_vote_weights.decidim_decidim_awesome.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from decidim_decidim_awesome (originally 20231006113837) | ||
|
||
class CreateDecidimAwesomeVoteWeights < ActiveRecord::Migration[6.0] | ||
def change | ||
create_table :decidim_awesome_vote_weights do |t| | ||
# this might be polymorphic in the future (if other types of votes are supported) | ||
t.references :proposal_vote, null: false, index: { name: "decidim_awesome_proposals_weights_vote" } | ||
|
||
t.integer :weight, null: false, default: 1 | ||
t.timestamps | ||
end | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
...te/20240626202512_create_decidim_awesome_proposal_extra_fields.decidim_decidim_awesome.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from decidim_decidim_awesome (originally 20231006113841) | ||
|
||
class CreateDecidimAwesomeProposalExtraFields < ActiveRecord::Migration[6.0] | ||
def change | ||
create_table :decidim_awesome_proposal_extra_fields do |t| | ||
# this might be polymorphic in the future (if other types of votes are supported) | ||
t.references :decidim_proposal, null: false, index: { name: "decidim_awesome_extra_fields_on_proposal" } | ||
|
||
t.jsonb :vote_weight_totals | ||
t.integer :weight_total, default: 0 | ||
t.timestamps | ||
end | ||
end | ||
end |
19 changes: 19 additions & 0 deletions
19
db/migrate/20240626202513_rename_editor_images_awesome_config.decidim_decidim_awesome.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from decidim_decidim_awesome (originally 20240306175331) | ||
|
||
class RenameEditorImagesAwesomeConfig < ActiveRecord::Migration[6.1] | ||
class AwesomeConfig < ApplicationRecord | ||
self.table_name = :decidim_awesome_config | ||
end | ||
|
||
# rubocop:disable Rails/SkipsModelValidations | ||
def up | ||
AwesomeConfig.where(var: :allow_images_in_full_editor).update_all(var: :allow_images_in_editors) | ||
AwesomeConfig.where(var: :allow_images_in_small_editor).destroy_all | ||
end | ||
|
||
def down | ||
AwesomeConfig.where(var: :allow_images_in_editors).update_all(var: :allow_images_in_full_editor) | ||
end | ||
# rubocop:enable Rails/SkipsModelValidations | ||
end |