Commit b6e3b059b45157c8506fe974d967f88e166afd96
1 parent
09c48607
Exists in
refactor_software_communities
software-communities: refactoring namespaces
- Update migrations Signed-off-by: Luciano Prestes Cavalcanti <lucianopcbr@gmail.com>
Showing
7 changed files
with
35 additions
and
24 deletions
Show diff stats
src/noosfero-spb/software_communities/db/migrate/20140528193902_create_license_infos_table.rb
@@ -4,9 +4,6 @@ class CreateLicenseInfosTable < ActiveRecord::Migration | @@ -4,9 +4,6 @@ class CreateLicenseInfosTable < ActiveRecord::Migration | ||
4 | t.string :version | 4 | t.string :version |
5 | t.string :link | 5 | t.string :link |
6 | end | 6 | end |
7 | - | ||
8 | - link = "http://creativecommons.org/licenses/GPL/2.0/legalcode.pt" | ||
9 | - LicenseInfo.create(:version => "CC-GPL-V2", :link => link) | ||
10 | end | 7 | end |
11 | 8 | ||
12 | def self.down | 9 | def self.down |
src/noosfero-spb/software_communities/db/migrate/20140528193956_create_programming_languages_table.rb
@@ -3,8 +3,6 @@ class CreateProgrammingLanguagesTable < ActiveRecord::Migration | @@ -3,8 +3,6 @@ class CreateProgrammingLanguagesTable < ActiveRecord::Migration | ||
3 | create_table :programming_languages do |t| | 3 | create_table :programming_languages do |t| |
4 | t.string :name | 4 | t.string :name |
5 | end | 5 | end |
6 | - | ||
7 | - SoftwareHelper.create_list_with_file("plugins/software_communities/public/static/languages.txt", ProgrammingLanguage) | ||
8 | end | 6 | end |
9 | 7 | ||
10 | def self.down | 8 | def self.down |
src/noosfero-spb/software_communities/db/migrate/20140528194044_create_database_descriptions_table.rb
@@ -3,9 +3,6 @@ class CreateDatabaseDescriptionsTable < ActiveRecord::Migration | @@ -3,9 +3,6 @@ class CreateDatabaseDescriptionsTable < ActiveRecord::Migration | ||
3 | create_table :database_descriptions do |t| | 3 | create_table :database_descriptions do |t| |
4 | t.string :name | 4 | t.string :name |
5 | end | 5 | end |
6 | - | ||
7 | - path_to_file = "plugins/software_communities/public/static/databases.txt" | ||
8 | - SoftwareHelper.create_list_with_file(path_to_file, DatabaseDescription) | ||
9 | end | 6 | end |
10 | 7 | ||
11 | def self.down | 8 | def self.down |
src/noosfero-spb/software_communities/db/migrate/20140714133901_create_operating_name_table.rb
@@ -3,9 +3,6 @@ class CreateOperatingNameTable < ActiveRecord::Migration | @@ -3,9 +3,6 @@ class CreateOperatingNameTable < ActiveRecord::Migration | ||
3 | create_table :operating_system_names do |t| | 3 | create_table :operating_system_names do |t| |
4 | t.string :name | 4 | t.string :name |
5 | end | 5 | end |
6 | - | ||
7 | - path_to_file = "plugins/software_communities/public/static/operating_systems.txt" | ||
8 | - SoftwareHelper.create_list_with_file(path_to_file, OperatingSystemName) | ||
9 | end | 6 | end |
10 | 7 | ||
11 | def down | 8 | def down |
src/noosfero-spb/software_communities/db/migrate/20150210182519_rename_cc_license.rb
@@ -1,13 +0,0 @@ | @@ -1,13 +0,0 @@ | ||
1 | -class RenameCcLicense < ActiveRecord::Migration | ||
2 | - def up | ||
3 | - license = LicenseInfo.find_by_version "CC-GPL-V2" | ||
4 | - license.version = "Creative Commons GPL V2" | ||
5 | - license.save! | ||
6 | - end | ||
7 | - | ||
8 | - def down | ||
9 | - license = LicenseInfo.find_by_version "Creative Commons GPL V2" | ||
10 | - license.version = "CC-GPL-V2" | ||
11 | - license.save! | ||
12 | - end | ||
13 | -end |
src/noosfero-spb/software_communities/db/migrate/20151125170753_rename_cc_license.rb
0 → 100644
@@ -0,0 +1,18 @@ | @@ -0,0 +1,18 @@ | ||
1 | +class RenameCcLicense < ActiveRecord::Migration | ||
2 | + def up | ||
3 | + license = SoftwareCommunitiesPlugin::LicenseInfo.find_by_version "CC-GPL-V2" | ||
4 | + unless license.nil? | ||
5 | + license.version = "Creative Commons GPL V2" | ||
6 | + license.save! | ||
7 | + end | ||
8 | + end | ||
9 | + | ||
10 | + def down | ||
11 | + license = SoftwareCommunitiesPlugin::LicenseInfo.find_by_version "Creative Commons GPL V2" | ||
12 | + unless license.nil? | ||
13 | + license.version = "CC-GPL-V2" | ||
14 | + license.save! | ||
15 | + end | ||
16 | + end | ||
17 | +end | ||
18 | + |
src/noosfero-spb/software_communities/db/migrate/20151125171258_create_basic_infos.rb
0 → 100644
@@ -0,0 +1,17 @@ | @@ -0,0 +1,17 @@ | ||
1 | +class CreateBasicInfos < ActiveRecord::Migration | ||
2 | + def up | ||
3 | + link = "http://creativecommons.org/licenses/GPL/2.0/legalcode.pt" | ||
4 | + SoftwareCommunitiesPlugin::LicenseInfo.create(:version => "CC-GPL-V2", :link => link) | ||
5 | + | ||
6 | + SoftwareCommunitiesPlugin::SoftwareHelper.create_list_with_file("plugins/software_communities/public/static/languages.txt", SoftwareCommunitiesPlugin::ProgrammingLanguage) | ||
7 | + | ||
8 | + path_to_file = "plugins/software_communities/public/static/databases.txt" | ||
9 | + SoftwareCommunitiesPlugin::SoftwareHelper.create_list_with_file(path_to_file, SoftwareCommunitiesPlugin::DatabaseDescription) | ||
10 | + | ||
11 | + path_to_file = "plugins/software_communities/public/static/operating_systems.txt" | ||
12 | + SoftwareCommunitiesPlugin::SoftwareHelper.create_list_with_file(path_to_file, SoftwareCommunitiesPlugin::OperatingSystemName) | ||
13 | + end | ||
14 | + | ||
15 | + def down | ||
16 | + end | ||
17 | +end |