diff options
author | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2011-01-31 15:00:27 +0100 |
---|---|---|
committer | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2011-01-31 15:00:27 +0100 |
commit | 6e5a780ba6ca83fd68267b0cc40f8943eb267827 (patch) | |
tree | 2f3aa64f2a1382284eedb6be71811d7dcb52470c /db/migrate | |
download | ecs2-6e5a780ba6ca83fd68267b0cc40f8943eb267827.tar.gz ecs2-6e5a780ba6ca83fd68267b0cc40f8943eb267827.zip |
Initial commit.
Diffstat (limited to 'db/migrate')
23 files changed, 707 insertions, 0 deletions
diff --git a/db/migrate/20091006133635_create_sessions.rb b/db/migrate/20091006133635_create_sessions.rb new file mode 100644 index 0000000..e9f4c11 --- /dev/null +++ b/db/migrate/20091006133635_create_sessions.rb @@ -0,0 +1,34 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class CreateSessions < ActiveRecord::Migration + def self.up + create_table :sessions do |t| + t.string :session_id, :null => false + t.text :data + t.timestamps + end + + add_index :sessions, :session_id + add_index :sessions, :updated_at + end + + def self.down + drop_table :sessions + end +end diff --git a/db/migrate/20100121203546_create_participants.rb b/db/migrate/20100121203546_create_participants.rb new file mode 100644 index 0000000..1b4d0f0 --- /dev/null +++ b/db/migrate/20100121203546_create_participants.rb @@ -0,0 +1,37 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class CreateParticipants < ActiveRecord::Migration + def self.up + create_table :participants do |t| + t.string :name + t.string :dns + t.string :email + t.text :description + t.integer :organization_id + t.datetime :ttl, :null => true, :default => nil + t.boolean :anonymous, :null => false, :default => false + + t.timestamps + end + end + + def self.down + drop_table :participants + end +end diff --git a/db/migrate/20100121205728_create_communities.rb b/db/migrate/20100121205728_create_communities.rb new file mode 100644 index 0000000..dc566d8 --- /dev/null +++ b/db/migrate/20100121205728_create_communities.rb @@ -0,0 +1,32 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class CreateCommunities < ActiveRecord::Migration + def self.up + create_table :communities do |t| + t.string :name + t.text :description + + t.timestamps + end + end + + def self.down + drop_table :communities + end +end diff --git a/db/migrate/20100121205935_create_memberships.rb b/db/migrate/20100121205935_create_memberships.rb new file mode 100644 index 0000000..9c09ec6 --- /dev/null +++ b/db/migrate/20100121205935_create_memberships.rb @@ -0,0 +1,32 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class CreateMemberships < ActiveRecord::Migration + def self.up + create_table :memberships do |t| + t.integer :participant_id + t.integer :community_id + + t.timestamps + end + end + + def self.down + drop_table :memberships + end +end diff --git a/db/migrate/20100121210405_create_organizations.rb b/db/migrate/20100121210405_create_organizations.rb new file mode 100644 index 0000000..515c2b1 --- /dev/null +++ b/db/migrate/20100121210405_create_organizations.rb @@ -0,0 +1,33 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class CreateOrganizations < ActiveRecord::Migration + def self.up + create_table :organizations do |t| + t.string :name + t.text :description + t.string :abrev + + t.timestamps + end + end + + def self.down + drop_table :organizations + end +end diff --git a/db/migrate/20100131022034_create_identities.rb b/db/migrate/20100131022034_create_identities.rb new file mode 100644 index 0000000..5d533ab --- /dev/null +++ b/db/migrate/20100131022034_create_identities.rb @@ -0,0 +1,33 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class CreateIdentities < ActiveRecord::Migration + def self.up + create_table :identities do |t| + t.integer :participant_id + t.string :name + t.text :description + + t.timestamps + end + end + + def self.down + drop_table :identities + end +end diff --git a/db/migrate/20100205192422_create_messages.rb b/db/migrate/20100205192422_create_messages.rb new file mode 100644 index 0000000..8f7541f --- /dev/null +++ b/db/migrate/20100205192422_create_messages.rb @@ -0,0 +1,34 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class CreateMessages < ActiveRecord::Migration + def self.up + create_table :messages do |t| + t.string :content_type, :x_ecs_receiver_communities, :x_ecs_receiver_memberships, :null => true, :default => nil + t.integer :sender, :null => true, :default => nil + t.text :body, :null => true, :default => nil + + t.integer :ressource_id + t.timestamps + end + end + + def self.down + drop_table :messages + end +end diff --git a/db/migrate/20100205192757_create_membership_messages.rb b/db/migrate/20100205192757_create_membership_messages.rb new file mode 100644 index 0000000..c062f76 --- /dev/null +++ b/db/migrate/20100205192757_create_membership_messages.rb @@ -0,0 +1,32 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class CreateMembershipMessages < ActiveRecord::Migration + def self.up + create_table :membership_messages do |t| + t.integer :membership_id + t.integer :message_id + + t.timestamps + end + end + + def self.down + drop_table :membership_messages + end +end diff --git a/db/migrate/20100406115338_create_ressources.rb b/db/migrate/20100406115338_create_ressources.rb new file mode 100644 index 0000000..3e14de3 --- /dev/null +++ b/db/migrate/20100406115338_create_ressources.rb @@ -0,0 +1,32 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class CreateRessources < ActiveRecord::Migration + def self.up + create_table :ressources do |t| + t.string :namespace, :ressource, :null => true, :default => nil + t.boolean :postroute, :null => true, :default => false + + t.timestamps + end + end + + def self.down + drop_table :ressources + end +end diff --git a/db/migrate/20100425195021_add_monitor_to_message.rb b/db/migrate/20100425195021_add_monitor_to_message.rb new file mode 100644 index 0000000..81d4282 --- /dev/null +++ b/db/migrate/20100425195021_add_monitor_to_message.rb @@ -0,0 +1,34 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class AddMonitorToMessage < ActiveRecord::Migration + def self.up + add_column :messages, :lock_version, :integer, :default => 0 + add_column :messages, :monitor, :integer, :default => 0 + #Message.all.each do |m| + # m.lock_version = 0 + # m.monitor = false + # m.save + #end + end + + def self.down + remove_column :messages, :monitor + remove_column :messages, :lock_version + end +end diff --git a/db/migrate/20100802084408_create_ressource_monitors.rb b/db/migrate/20100802084408_create_ressource_monitors.rb new file mode 100644 index 0000000..62c09a2 --- /dev/null +++ b/db/migrate/20100802084408_create_ressource_monitors.rb @@ -0,0 +1,33 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class CreateRessourceMonitors < ActiveRecord::Migration + def self.up + create_table :ressource_monitors do |t| + t.integer :lock_version, :default => 0 + t.integer :touch, :default => 0 + t.string :name + + t.timestamps + end + end + + def self.down + drop_table :ressource_monitors + end +end diff --git a/db/migrate/20100802085027_remove_columns_from_message.rb b/db/migrate/20100802085027_remove_columns_from_message.rb new file mode 100644 index 0000000..573ed66 --- /dev/null +++ b/db/migrate/20100802085027_remove_columns_from_message.rb @@ -0,0 +1,29 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class RemoveColumnsFromMessage < ActiveRecord::Migration + def self.up + remove_column :messages, :lock_version + remove_column :messages, :monitor + end + + def self.down + add_column :messages, :monitor, :integer + add_column :messages, :lock_version, :integer + end +end diff --git a/db/migrate/20100922104919_rename_touch_from_ressource_monitors.rb b/db/migrate/20100922104919_rename_touch_from_ressource_monitors.rb new file mode 100644 index 0000000..829eea7 --- /dev/null +++ b/db/migrate/20100922104919_rename_touch_from_ressource_monitors.rb @@ -0,0 +1,27 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class RenameTouchFromRessourceMonitors < ActiveRecord::Migration + def self.up + rename_column :ressource_monitors, :touch, :monitor_counter + end + + def self.down + raise ActiveRecord::IrreversibleMigration + end +end diff --git a/db/migrate/20101109101215_create_ev_types.rb b/db/migrate/20101109101215_create_ev_types.rb new file mode 100644 index 0000000..caa5b64 --- /dev/null +++ b/db/migrate/20101109101215_create_ev_types.rb @@ -0,0 +1,31 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class CreateEvTypes < ActiveRecord::Migration + def self.up + create_table :ev_types do |t| + t.string :name + + t.timestamps + end + end + + def self.down + drop_table :ev_types + end +end diff --git a/db/migrate/20101109141511_create_events.rb b/db/migrate/20101109141511_create_events.rb new file mode 100644 index 0000000..64f49d5 --- /dev/null +++ b/db/migrate/20101109141511_create_events.rb @@ -0,0 +1,33 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class CreateEvents < ActiveRecord::Migration + def self.up + create_table :events do |t| + t.integer :participant_id + t.integer :message_id + t.integer :ev_type_id + + t.timestamps + end + end + + def self.down + drop_table :events + end +end diff --git a/db/migrate/20101117081838_add_lock_version_to_membership_messages.rb b/db/migrate/20101117081838_add_lock_version_to_membership_messages.rb new file mode 100644 index 0000000..b4d103a --- /dev/null +++ b/db/migrate/20101117081838_add_lock_version_to_membership_messages.rb @@ -0,0 +1,27 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class AddLockVersionToMembershipMessages < ActiveRecord::Migration + def self.up + add_column :membership_messages, :lock_version, :integer, :default => 0 + end + + def self.down + remove_column :membership_messages, :lock_version + end +end diff --git a/db/migrate/20101118104211_add_lock_version_to_event.rb b/db/migrate/20101118104211_add_lock_version_to_event.rb new file mode 100644 index 0000000..eb18998 --- /dev/null +++ b/db/migrate/20101118104211_add_lock_version_to_event.rb @@ -0,0 +1,27 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class AddLockVersionToEvent < ActiveRecord::Migration + def self.up + add_column :events, :lock_version, :integer, :default => 0 + end + + def self.down + remove_column :events, :lock_version + end +end diff --git a/db/migrate/20101119114524_add_removed_to_messages.rb b/db/migrate/20101119114524_add_removed_to_messages.rb new file mode 100644 index 0000000..006ae5f --- /dev/null +++ b/db/migrate/20101119114524_add_removed_to_messages.rb @@ -0,0 +1,27 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class AddRemovedToMessages < ActiveRecord::Migration + def self.up + add_column :messages, :removed, :boolean, :default => false + end + + def self.down + remove_column :messages, :removed + end +end diff --git a/db/migrate/20101119114704_add_events_to_ressources.rb b/db/migrate/20101119114704_add_events_to_ressources.rb new file mode 100644 index 0000000..87629b5 --- /dev/null +++ b/db/migrate/20101119114704_add_events_to_ressources.rb @@ -0,0 +1,27 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class AddEventsToRessources < ActiveRecord::Migration + def self.up + add_column :ressources, :events, :boolean, :default => true + end + + def self.down + remove_column :ressources, :events + end +end diff --git a/db/migrate/20101220150806_add_community_selfrouting_to_participants.rb b/db/migrate/20101220150806_add_community_selfrouting_to_participants.rb new file mode 100644 index 0000000..53ec402 --- /dev/null +++ b/db/migrate/20101220150806_add_community_selfrouting_to_participants.rb @@ -0,0 +1,27 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class AddCommunitySelfroutingToParticipants < ActiveRecord::Migration + def self.up + add_column :participants, :community_selfrouting, :boolean, :default => false + end + + def self.down + remove_column :participants, :community_selfrouting + end +end diff --git a/db/migrate/20101223102836_create_community_messages.rb b/db/migrate/20101223102836_create_community_messages.rb new file mode 100644 index 0000000..9b3326a --- /dev/null +++ b/db/migrate/20101223102836_create_community_messages.rb @@ -0,0 +1,32 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class CreateCommunityMessages < ActiveRecord::Migration + def self.up + create_table :community_messages do |t| + t.integer :community_id + t.integer :message_id + + t.timestamps + end + end + + def self.down + drop_table :community_messages + end +end diff --git a/db/migrate/20110103143940_remove_xecsreceivercommunities_from_message.rb b/db/migrate/20110103143940_remove_xecsreceivercommunities_from_message.rb new file mode 100644 index 0000000..5144181 --- /dev/null +++ b/db/migrate/20110103143940_remove_xecsreceivercommunities_from_message.rb @@ -0,0 +1,27 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class RemoveXecsreceivercommunitiesFromMessage < ActiveRecord::Migration + def self.up + remove_column :messages, :x_ecs_receiver_communities + end + + def self.down + add_column :messages, :x_ecs_receiver_communities + end +end diff --git a/db/migrate/20110103145840_remove_xecsreceivermemberships_from_message.rb b/db/migrate/20110103145840_remove_xecsreceivermemberships_from_message.rb new file mode 100644 index 0000000..e31b347 --- /dev/null +++ b/db/migrate/20110103145840_remove_xecsreceivermemberships_from_message.rb @@ -0,0 +1,27 @@ +# Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). +# +# This file is part of ECS. +# +# ECS is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# ECS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +class RemoveXecsreceivermembershipsFromMessage < ActiveRecord::Migration + def self.up + remove_column :messages, :x_ecs_receiver_memberships + end + + def self.down + add_column :messages, :x_ecs_receiver_memberships + end +end |