summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb6
-rw-r--r--db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb11
-rw-r--r--db/migrate/20130124125238_add_default_user_groups_for_new_users.rb9
3 files changed, 26 insertions, 0 deletions
diff --git a/db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb b/db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb
new file mode 100644
index 0000000..46b4884
--- /dev/null
+++ b/db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb
@@ -0,0 +1,6 @@
+class AddDefaultCompanyNameToGemeinschaftSetup < ActiveRecord::Migration
+ def change
+ add_column :gemeinschaft_setups, :default_company_name, :string
+ add_column :gemeinschaft_setups, :default_system_email, :string
+ end
+end
diff --git a/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb b/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb
new file mode 100644
index 0000000..6bbac04
--- /dev/null
+++ b/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb
@@ -0,0 +1,11 @@
+class AddMobileMaxStringLengthParameter < ActiveRecord::Migration
+ def up
+ GsParameter.create(:name => 'MOBILE_MAX_STRING_LENGTH', :section => 'HTML', :value => '8', :class_type => 'Integer', :description => 'Max length of a string on a mobile devise.')
+ GsParameter.create(:name => 'DESKTOP_MAX_STRING_LENGTH', :section => 'HTML', :value => '30', :class_type => 'Integer', :description => 'Max length of a string on a desktop devise.')
+ end
+
+ def down
+ GsParameter.where(:name => 'MOBILE_MAX_STRING_LENGTH').destroy_all
+ GsParameter.where(:name => 'DESKTOP_MAX_STRING_LENGTH').destroy_all
+ end
+end
diff --git a/db/migrate/20130124125238_add_default_user_groups_for_new_users.rb b/db/migrate/20130124125238_add_default_user_groups_for_new_users.rb
new file mode 100644
index 0000000..d2700d6
--- /dev/null
+++ b/db/migrate/20130124125238_add_default_user_groups_for_new_users.rb
@@ -0,0 +1,9 @@
+class AddDefaultUserGroupsForNewUsers < ActiveRecord::Migration
+ def up
+ GsParameter.create(:name => 'DEFAULT_USER_GROUPS_IDS', :section => 'New user defaults', :value => "---\n- 3\n", :class_type => 'YAML', :description => 'Default user group ids for a new user.')
+ end
+
+ def down
+ GsParameter.where(:name => 'DEFAULT_USER_GROUPS_IDS').destroy_all
+ end
+end