forked from codeforjapan/decidim-cfj
-
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.
Merge pull request codeforjapan#592 from ayuki-joto/feat/add-decidim-…
…navigation-maps feat: add decidim-navigation-maps
- Loading branch information
Showing
13 changed files
with
880 additions
and
479 deletions.
There are no files selected for viewing
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
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
14 changes: 14 additions & 0 deletions
14
...grate/20240128143437_create_decidim_navigation_maps_blueprints.decidim_navigation_maps.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_navigation_maps (originally 20191022092624) | ||
|
||
class CreateDecidimNavigationMapsBlueprints < ActiveRecord::Migration[5.2] | ||
def change | ||
create_table :decidim_navigation_maps_blueprints do |t| | ||
t.jsonb :blueprint | ||
t.string :image | ||
t.references :decidim_organization, null: false, foreign_key: true, index: { name: "decidim_navigation_maps_constraint_organization" } | ||
|
||
t.timestamps | ||
end | ||
end | ||
end |
11 changes: 11 additions & 0 deletions
11
db/migrate/20240128143438_add_title_to_navigation_maps_blueprints.decidim_navigation_maps.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,11 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from decidim_navigation_maps (originally 20191120185739) | ||
|
||
class AddTitleToNavigationMapsBlueprints < ActiveRecord::Migration[5.2] | ||
def change | ||
change_table :decidim_navigation_maps_blueprints do |t| | ||
t.jsonb :title, default: {} | ||
t.jsonb :description, default: {} | ||
end | ||
end | ||
end |
19 changes: 19 additions & 0 deletions
19
.../20240128143439_create_decidim_navigation_maps_blueprint_areas.decidim_navigation_maps.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_navigation_maps (originally 20191125142751) | ||
|
||
class CreateDecidimNavigationMapsBlueprintAreas < ActiveRecord::Migration[5.2] | ||
def change | ||
create_table :decidim_navigation_maps_blueprint_areas do |t| | ||
t.jsonb :area | ||
t.references :decidim_navigation_maps_blueprint, null: false, foreign_key: true, index: { name: "decidim_navigation_maps_constraint_blueprint_id" } | ||
t.jsonb :title, default: {} | ||
t.jsonb :description, default: {} | ||
t.string :area_type | ||
t.string :url | ||
|
||
t.timestamps | ||
end | ||
|
||
remove_column :decidim_navigation_maps_blueprints, :blueprint, :jsonb | ||
end | ||
end |
9 changes: 9 additions & 0 deletions
9
...43440_add_link_type_to_decidim_navigation_maps_blueprint_areas.decidim_navigation_maps.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,9 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from decidim_navigation_maps (originally 20191126045831) | ||
|
||
class AddLinkTypeToDecidimNavigationMapsBlueprintAreas < ActiveRecord::Migration[5.2] | ||
def change | ||
rename_column :decidim_navigation_maps_blueprint_areas, :url, :link | ||
add_column :decidim_navigation_maps_blueprint_areas, :link_type, :string | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
...8143441_add_area_id_to_decidim_navigation_maps_blueprint_areas.decidim_navigation_maps.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_navigation_maps (originally 20191126154019) | ||
|
||
class AddAreaIdToDecidimNavigationMapsBlueprintAreas < ActiveRecord::Migration[5.2] | ||
class Area < ApplicationRecord | ||
self.table_name = "decidim_navigation_maps_blueprint_areas" | ||
end | ||
|
||
def change | ||
add_column :decidim_navigation_maps_blueprint_areas, :area_id, :string | ||
|
||
Area.find_each do |area| | ||
area.area_id = area.id | ||
area.save! | ||
end | ||
end | ||
end |
8 changes: 8 additions & 0 deletions
8
...te/20240128143442_add_color_to_navigation_maps_blueprint_areas.decidim_navigation_maps.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,8 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from decidim_navigation_maps (originally 20191127093746) | ||
|
||
class AddColorToNavigationMapsBlueprintAreas < ActiveRecord::Migration[5.2] | ||
def change | ||
add_column :decidim_navigation_maps_blueprint_areas, :color, :string | ||
end | ||
end |
13 changes: 13 additions & 0 deletions
13
...40128143443_add_reference_to_content_block_to_blueprints_table.decidim_navigation_maps.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_navigation_maps (originally 20201105130724) | ||
|
||
class AddReferenceToContentBlockToBlueprintsTable < ActiveRecord::Migration[5.2] | ||
def change | ||
add_reference( | ||
:decidim_navigation_maps_blueprints, | ||
:decidim_content_block, | ||
foreign_key: true, | ||
index: { name: "decidim_navigation_maps_constraint_content_block" } | ||
) | ||
end | ||
end |
8 changes: 8 additions & 0 deletions
8
...igrate/20240128143444_add_height_to_navigation_maps_blueprints.decidim_navigation_maps.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,8 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from decidim_navigation_maps (originally 20210112135817) | ||
|
||
class AddHeightToNavigationMapsBlueprints < ActiveRecord::Migration[5.2] | ||
def change | ||
add_column :decidim_navigation_maps_blueprints, :height, :integer, null: false, default: 475 | ||
end | ||
end |
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
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
Oops, something went wrong.