Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-04 19:11:30 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-04 19:11:30 +0400
commite8f8abddb0e56dd5704652360d286068c1948583 (patch)
treed5fdec2eee77347b908bfb285cc15422310d9942 /db
parent32b9ec50dddb8a82ffceefe17c4cc6fbaacc1ed4 (diff)
Squash migrations for years 2011 and 2012
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20110913200833_devise_create_users.rb55
-rw-r--r--db/migrate/20110913204141_create_projects.rb11
-rw-r--r--db/migrate/20110914221600_create_users_projects.rb13
-rw-r--r--db/migrate/20110915205627_add_private_flag_to_project.rb5
-rw-r--r--db/migrate/20110915213352_create_keys.rb9
-rw-r--r--db/migrate/20110916123731_add_name_to_user.rb5
-rw-r--r--db/migrate/20110916162511_add_key_title_to_key.rb7
-rw-r--r--db/migrate/20110917212932_add_identifier_to_key.rb5
-rw-r--r--db/migrate/20110921192501_create_issues.rb13
-rw-r--r--db/migrate/20110922110156_add_code_to_project.rb5
-rw-r--r--db/migrate/20110923211333_add_status_to_issue.rb5
-rw-r--r--db/migrate/20110924214549_create_rails_admin_histories_table.rb18
-rw-r--r--db/migrate/20110924215658_add_admin_field_to_user.rb5
-rw-r--r--db/migrate/20110926082616_remove_admin.rb9
-rw-r--r--db/migrate/20110927130352_create_notes.rb12
-rw-r--r--db/migrate/20110928140106_add_project_id_for_note.rb9
-rw-r--r--db/migrate/20110928142747_change_noteable_id_for_note.rb9
-rw-r--r--db/migrate/20110928161328_add_attachment_to_note.rb5
-rw-r--r--db/migrate/20111005193700_add_allow_repo_creation_for_user.rb9
-rw-r--r--db/migrate/20111009101738_add_ownerto_project.rb5
-rw-r--r--db/migrate/20111009110913_add_projects_limit_to_user.rb5
-rw-r--r--db/migrate/20111009111204_remove_allow_create_repo_from_user.rb9
-rw-r--r--db/migrate/20111015154310_add_position_to_issues.rb5
-rw-r--r--db/migrate/20111016183422_create_snippets.rb12
-rw-r--r--db/migrate/20111016193417_add_content_type_to_snippets.rb5
-rw-r--r--db/migrate/20111016195506_add_file_name_to_snippets.rb6
-rw-r--r--db/migrate/20111019212429_add_social_to_user.rb7
-rw-r--r--db/migrate/20111021101550_change_social_fields_in_users.rb14
-rw-r--r--db/migrate/20111025134235_add_high_label_to_issue.rb5
-rw-r--r--db/migrate/20111027051828_add_expires_at_to_snippets.rb5
-rw-r--r--db/migrate/20111027142641_change_note_note_to_text.rb8
-rw-r--r--db/migrate/20111027152724_issue_conten_to_note.rb34
-rw-r--r--db/migrate/20111101222453_acts_as_taggable_on_migration.rb28
-rw-r--r--db/migrate/20111111093150_remove_content_from_issues.rb9
-rw-r--r--db/migrate/20111115063954_add_authentication_token_to_users.rb5
-rw-r--r--db/migrate/20111124115339_add_extra_field_to_issue.rb5
-rw-r--r--db/migrate/20111127155345_create_merge_requests.rb15
-rw-r--r--db/migrate/20111206213842_add_advanced_rights_to_team_member.rb6
-rw-r--r--db/migrate/20111206222316_migrate_to_new_rights.rb20
-rw-r--r--db/migrate/20111207211728_add_default_branch_to_project.rb5
-rw-r--r--db/migrate/20111214091851_create_web_hooks.rb9
-rw-r--r--db/migrate/20111220190817_add_coloscheme_option_to_user.rb5
-rw-r--r--db/migrate/20111231111825_add_project_id_to_key.rb6
-rw-r--r--db/migrate/20120110180749_add_line_number_to_note.rb5
-rw-r--r--db/migrate/20120119202326_add_indexes.rb9
-rw-r--r--db/migrate/20120121122616_fix_noteable_id.rb8
-rw-r--r--db/migrate/20120206170141_add_modularity_fields_to_project.rb7
-rw-r--r--db/migrate/20120215182305_create_protected_branches.rb10
-rw-r--r--db/migrate/20120216085842_move_to_roles_permissions.rb22
-rw-r--r--db/migrate/20120216215008_create_wikis.rb11
-rw-r--r--db/migrate/20120219130957_add_slug_to_wiki.rb6
-rw-r--r--db/migrate/20120219140810_add_wiki_enabled_to_project.rb6
-rw-r--r--db/migrate/20120219193300_add_user_to_wiki.rb6
-rw-r--r--db/migrate/20120228130210_create_events.rb14
-rw-r--r--db/migrate/20120228134252_add_action_to_event.rb5
-rw-r--r--db/migrate/20120301185805_add_theme_to_user.rb6
-rw-r--r--db/migrate/20120307095918_add_author_id_to_event.rb5
-rw-r--r--db/migrate/20120315111711_add_commits_diff_store_to_merge_request.rb6
-rw-r--r--db/migrate/20120315132931_add_merged_to_merge_request.rb5
-rw-r--r--db/migrate/20120317095543_add_description_to_issues.rb5
-rw-r--r--db/migrate/20120323221339_add_bio_field_to_user.rb5
-rw-r--r--db/migrate/20120329170745_add_automerge_to_merge_request.rb5
-rw-r--r--db/migrate/20120405211750_increase_mr_text_column_size.rb10
-rw-r--r--db/migrate/20120408180246_create_milestones.rb12
-rw-r--r--db/migrate/20120408181910_add_milestone_id_to_issue.rb5
-rw-r--r--db/migrate/20120413135904_add_blocked_field_to_user.rb5
-rw-r--r--db/migrate/20120627145613_remove_critical_from_issue.rb9
-rw-r--r--db/migrate/20120706065612_add_lockable_to_users.rb6
-rw-r--r--db/migrate/20120712080407_add_type_to_web_hook.rb5
-rw-r--r--db/migrate/20120729131232_add_extern_auth_provider_to_users.rb8
-rw-r--r--db/migrate/20120905043334_set_default_branch_default_to_nil.rb12
-rw-r--r--db/migrate/20121002150926_create_groups.rb11
-rw-r--r--db/migrate/20121002151033_add_group_id_to_project.rb5
-rw-r--r--db/migrate/20121009205010_postgres_create_integer_cast.rb15
-rw-r--r--db/migrate/20121026114600_add_milestone_id_to_merge_requests.rb5
-rw-r--r--db/migrate/20121119170638_create_services.rb12
-rw-r--r--db/migrate/20121120051432_add_service_id_to_web_hook.rb5
-rw-r--r--db/migrate/20121120103700_add_active_to_service.rb5
-rw-r--r--db/migrate/20121120113838_add_project_url_to_service.rb5
-rw-r--r--db/migrate/20121122145155_convert_group_to_namespace.rb13
-rw-r--r--db/migrate/20121122150932_add_namespace_id_to_project.rb5
-rw-r--r--db/migrate/20121123104937_add_username_to_user.rb5
-rw-r--r--db/migrate/20121123164910_rename_code_to_path.rb11
-rw-r--r--db/migrate/20121203154450_add_events_indices.rb8
-rw-r--r--db/migrate/20121203160507_more_indices.rb26
-rw-r--r--db/migrate/20121205201726_add_more_indexes.rb44
-rw-r--r--db/migrate/20121218164840_move_noteable_commit_to_own_field.rb20
-rw-r--r--db/migrate/20121219095402_indices_for_notes.rb6
-rw-r--r--db/migrate/20121219183753_create_user_teams.rb11
-rw-r--r--db/migrate/20121220064104_create_user_team_project_relationships.rb11
-rw-r--r--db/migrate/20121220064453_create_user_team_user_relationships.rb12
-rw-r--r--db/migrate/20121220064453_init_schema.rb306
92 files changed, 306 insertions, 895 deletions
diff --git a/db/migrate/20110913200833_devise_create_users.rb b/db/migrate/20110913200833_devise_create_users.rb
deleted file mode 100644
index e00f275c55d..00000000000
--- a/db/migrate/20110913200833_devise_create_users.rb
+++ /dev/null
@@ -1,55 +0,0 @@
-class DeviseCreateUsers < ActiveRecord::Migration
- def self.up
- create_table(:users) do |t|
- ## Database authenticatable
- t.string :email, :null => false, :default => ""
- t.string :encrypted_password, :null => false, :default => ""
-
- ## Recoverable
- t.string :reset_password_token
- t.datetime :reset_password_sent_at
-
- ## Rememberable
- t.datetime :remember_created_at
-
- ## Trackable
- t.integer :sign_in_count, :default => 0
- t.datetime :current_sign_in_at
- t.datetime :last_sign_in_at
- t.string :current_sign_in_ip
- t.string :last_sign_in_ip
-
- ## Encryptable
- # t.string :password_salt
-
- ## Confirmable
- # t.string :confirmation_token
- # t.datetime :confirmed_at
- # t.datetime :confirmation_sent_at
- # t.string :unconfirmed_email # Only if using reconfirmable
-
- ## Lockable
- # t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
- # t.string :unlock_token # Only if unlock strategy is :email or :both
- # t.datetime :locked_at
-
- # Token authenticatable
- # t.string :authentication_token
-
- ## Invitable
- # t.string :invitation_token
-
- t.timestamps
- end
-
- add_index :users, :email, :unique => true
- add_index :users, :reset_password_token, :unique => true
- # add_index :users, :confirmation_token, :unique => true
- # add_index :users, :unlock_token, :unique => true
- # add_index :users, :authentication_token, :unique => true
- end
-
- def self.down
- drop_table :users
- end
-end
diff --git a/db/migrate/20110913204141_create_projects.rb b/db/migrate/20110913204141_create_projects.rb
deleted file mode 100644
index 45b76f95563..00000000000
--- a/db/migrate/20110913204141_create_projects.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-class CreateProjects < ActiveRecord::Migration
- def change
- create_table :projects do |t|
- t.string :name
- t.string :path
- t.text :description
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20110914221600_create_users_projects.rb b/db/migrate/20110914221600_create_users_projects.rb
deleted file mode 100644
index a89798ae86f..00000000000
--- a/db/migrate/20110914221600_create_users_projects.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class CreateUsersProjects < ActiveRecord::Migration
- def change
- create_table :users_projects do |t|
- t.integer :user_id, :null => false
- t.integer :project_id, :null => false
- t.boolean :read, :default => false
- t.boolean :write, :default => false
- t.boolean :admin, :default => false
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20110915205627_add_private_flag_to_project.rb b/db/migrate/20110915205627_add_private_flag_to_project.rb
deleted file mode 100644
index 73c0b9df834..00000000000
--- a/db/migrate/20110915205627_add_private_flag_to_project.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddPrivateFlagToProject < ActiveRecord::Migration
- def change
- add_column :projects, :private_flag, :boolean, :default => true, :null => false
- end
-end
diff --git a/db/migrate/20110915213352_create_keys.rb b/db/migrate/20110915213352_create_keys.rb
deleted file mode 100644
index d4615b4babf..00000000000
--- a/db/migrate/20110915213352_create_keys.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class CreateKeys < ActiveRecord::Migration
- def change
- create_table :keys do |t|
- t.integer :user_id, :null => false
- t.text :project_id, :null => false
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20110916123731_add_name_to_user.rb b/db/migrate/20110916123731_add_name_to_user.rb
deleted file mode 100644
index 74142b05cb5..00000000000
--- a/db/migrate/20110916123731_add_name_to_user.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddNameToUser < ActiveRecord::Migration
- def change
- add_column :users, :name, :string
- end
-end
diff --git a/db/migrate/20110916162511_add_key_title_to_key.rb b/db/migrate/20110916162511_add_key_title_to_key.rb
deleted file mode 100644
index b2eaa51cccf..00000000000
--- a/db/migrate/20110916162511_add_key_title_to_key.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-class AddKeyTitleToKey < ActiveRecord::Migration
- def change
- add_column :keys, :key, :text
- add_column :keys, :title, :string
- remove_column :keys, :project_id
- end
-end
diff --git a/db/migrate/20110917212932_add_identifier_to_key.rb b/db/migrate/20110917212932_add_identifier_to_key.rb
deleted file mode 100644
index e572793952a..00000000000
--- a/db/migrate/20110917212932_add_identifier_to_key.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddIdentifierToKey < ActiveRecord::Migration
- def change
- add_column :keys, :identifier, :string
- end
-end
diff --git a/db/migrate/20110921192501_create_issues.rb b/db/migrate/20110921192501_create_issues.rb
deleted file mode 100644
index 63b42ad998e..00000000000
--- a/db/migrate/20110921192501_create_issues.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class CreateIssues < ActiveRecord::Migration
- def change
- create_table :issues do |t|
- t.string :title
- t.text :content
- t.integer :assignee_id
- t.integer :author_id
- t.integer :project_id
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20110922110156_add_code_to_project.rb b/db/migrate/20110922110156_add_code_to_project.rb
deleted file mode 100644
index f54a02bd70a..00000000000
--- a/db/migrate/20110922110156_add_code_to_project.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddCodeToProject < ActiveRecord::Migration
- def change
- add_column :projects, :code, :string
- end
-end
diff --git a/db/migrate/20110923211333_add_status_to_issue.rb b/db/migrate/20110923211333_add_status_to_issue.rb
deleted file mode 100644
index c53bf46ef72..00000000000
--- a/db/migrate/20110923211333_add_status_to_issue.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddStatusToIssue < ActiveRecord::Migration
- def change
- add_column :issues, :closed, :boolean, :default => false, :null => false
- end
-end
diff --git a/db/migrate/20110924214549_create_rails_admin_histories_table.rb b/db/migrate/20110924214549_create_rails_admin_histories_table.rb
deleted file mode 100644
index 3c743aa2874..00000000000
--- a/db/migrate/20110924214549_create_rails_admin_histories_table.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-class CreateRailsAdminHistoriesTable < ActiveRecord::Migration
- def self.up
- create_table :rails_admin_histories do |t|
- t.text :message # title, name, or object_id
- t.string :username
- t.integer :item
- t.string :table
- t.integer :month, :limit => 2
- t.integer :year, :limit => 5
- t.timestamps
- end
- add_index(:rails_admin_histories, [:item, :table, :month, :year], :name => 'index_rails_admin_histories' )
- end
-
- def self.down
- drop_table :rails_admin_histories
- end
-end
diff --git a/db/migrate/20110924215658_add_admin_field_to_user.rb b/db/migrate/20110924215658_add_admin_field_to_user.rb
deleted file mode 100644
index 321587e6957..00000000000
--- a/db/migrate/20110924215658_add_admin_field_to_user.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddAdminFieldToUser < ActiveRecord::Migration
- def change
- add_column :users, :admin, :boolean, :default => false, :null => false
- end
-end
diff --git a/db/migrate/20110926082616_remove_admin.rb b/db/migrate/20110926082616_remove_admin.rb
deleted file mode 100644
index aac9ff7888c..00000000000
--- a/db/migrate/20110926082616_remove_admin.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class RemoveAdmin < ActiveRecord::Migration
- def up
- drop_table :rails_admin_histories
- end
-
- def down
- raise "No rollback"
- end
-end
diff --git a/db/migrate/20110927130352_create_notes.rb b/db/migrate/20110927130352_create_notes.rb
deleted file mode 100644
index 72a0e817617..00000000000
--- a/db/migrate/20110927130352_create_notes.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-class CreateNotes < ActiveRecord::Migration
- def change
- create_table :notes do |t|
- t.string :note
- t.integer :noteable_id
- t.string :noteable_type
- t.integer :author_id
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20110928140106_add_project_id_for_note.rb b/db/migrate/20110928140106_add_project_id_for_note.rb
deleted file mode 100644
index 3e641089799..00000000000
--- a/db/migrate/20110928140106_add_project_id_for_note.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class AddProjectIdForNote < ActiveRecord::Migration
- def up
- add_column :notes, :project_id, :integer
- end
-
- def down
- remove_column :notes, :project_id, :integer
- end
-end
diff --git a/db/migrate/20110928142747_change_noteable_id_for_note.rb b/db/migrate/20110928142747_change_noteable_id_for_note.rb
deleted file mode 100644
index dc9d1f0171a..00000000000
--- a/db/migrate/20110928142747_change_noteable_id_for_note.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class ChangeNoteableIdForNote < ActiveRecord::Migration
- def up
- change_column :notes, :noteable_id, :string
- end
-
- def down
- change_column :notes, :noteable_id, :integer
- end
-end
diff --git a/db/migrate/20110928161328_add_attachment_to_note.rb b/db/migrate/20110928161328_add_attachment_to_note.rb
deleted file mode 100644
index 37d9cf10258..00000000000
--- a/db/migrate/20110928161328_add_attachment_to_note.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddAttachmentToNote < ActiveRecord::Migration
- def change
- add_column :notes, :attachment, :string
- end
-end
diff --git a/db/migrate/20111005193700_add_allow_repo_creation_for_user.rb b/db/migrate/20111005193700_add_allow_repo_creation_for_user.rb
deleted file mode 100644
index 82bd94b8089..00000000000
--- a/db/migrate/20111005193700_add_allow_repo_creation_for_user.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class AddAllowRepoCreationForUser < ActiveRecord::Migration
- def up
- add_column :users, :allowed_create_repo, :boolean, :default => true, :null => false
- end
-
- def down
- remove_column :users, :allowed_create_repo
- end
-end
diff --git a/db/migrate/20111009101738_add_ownerto_project.rb b/db/migrate/20111009101738_add_ownerto_project.rb
deleted file mode 100644
index 8d265533add..00000000000
--- a/db/migrate/20111009101738_add_ownerto_project.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddOwnertoProject < ActiveRecord::Migration
- def change
- add_column :projects, :owner_id, :integer
- end
-end
diff --git a/db/migrate/20111009110913_add_projects_limit_to_user.rb b/db/migrate/20111009110913_add_projects_limit_to_user.rb
deleted file mode 100644
index 8eb8382b515..00000000000
--- a/db/migrate/20111009110913_add_projects_limit_to_user.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddProjectsLimitToUser < ActiveRecord::Migration
- def change
- add_column :users, :projects_limit, :integer, :default => 10
- end
-end
diff --git a/db/migrate/20111009111204_remove_allow_create_repo_from_user.rb b/db/migrate/20111009111204_remove_allow_create_repo_from_user.rb
deleted file mode 100644
index 61452006397..00000000000
--- a/db/migrate/20111009111204_remove_allow_create_repo_from_user.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class RemoveAllowCreateRepoFromUser < ActiveRecord::Migration
- def up
- remove_column :users, :allowed_create_repo
- end
-
- def down
- add_column :users, :allowed_create_repo, :boolean, :default => true, :null => false
- end
-end
diff --git a/db/migrate/20111015154310_add_position_to_issues.rb b/db/migrate/20111015154310_add_position_to_issues.rb
deleted file mode 100644
index 41451a0cabb..00000000000
--- a/db/migrate/20111015154310_add_position_to_issues.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddPositionToIssues < ActiveRecord::Migration
- def change
- add_column :issues, :position, :integer, :default => 0
- end
-end
diff --git a/db/migrate/20111016183422_create_snippets.rb b/db/migrate/20111016183422_create_snippets.rb
deleted file mode 100644
index 9b0bf201cba..00000000000
--- a/db/migrate/20111016183422_create_snippets.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-class CreateSnippets < ActiveRecord::Migration
- def change
- create_table :snippets do |t|
- t.string :title
- t.text :content
- t.integer :author_id, :null => false
- t.integer :project_id, :null => false
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20111016193417_add_content_type_to_snippets.rb b/db/migrate/20111016193417_add_content_type_to_snippets.rb
deleted file mode 100644
index 511a6793f4f..00000000000
--- a/db/migrate/20111016193417_add_content_type_to_snippets.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddContentTypeToSnippets < ActiveRecord::Migration
- def change
- add_column :snippets, :content_type, :string, :null => false, :default => "txt"
- end
-end
diff --git a/db/migrate/20111016195506_add_file_name_to_snippets.rb b/db/migrate/20111016195506_add_file_name_to_snippets.rb
deleted file mode 100644
index d378d225ec1..00000000000
--- a/db/migrate/20111016195506_add_file_name_to_snippets.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-class AddFileNameToSnippets < ActiveRecord::Migration
- def change
- add_column :snippets, :file_name, :string
- remove_column :snippets, :content_type
- end
-end
diff --git a/db/migrate/20111019212429_add_social_to_user.rb b/db/migrate/20111019212429_add_social_to_user.rb
deleted file mode 100644
index b0ffe5366a4..00000000000
--- a/db/migrate/20111019212429_add_social_to_user.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-class AddSocialToUser < ActiveRecord::Migration
- def change
- add_column :users, :skype, :string
- add_column :users, :linkedin, :string
- add_column :users, :twitter, :string
- end
-end
diff --git a/db/migrate/20111021101550_change_social_fields_in_users.rb b/db/migrate/20111021101550_change_social_fields_in_users.rb
deleted file mode 100644
index 6e506c1cf9d..00000000000
--- a/db/migrate/20111021101550_change_social_fields_in_users.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-class ChangeSocialFieldsInUsers < ActiveRecord::Migration
- def up
- remove_column :users, :skype
- remove_column :users, :linkedin
- remove_column :users, :twitter
-
- add_column :users, :skype, :string, {:null => false, :default => ''}
- add_column :users, :linkedin, :string, {:null => false, :default => ''}
- add_column :users, :twitter, :string, {:null => false, :default => ''}
- end
-
- def down
- end
-end
diff --git a/db/migrate/20111025134235_add_high_label_to_issue.rb b/db/migrate/20111025134235_add_high_label_to_issue.rb
deleted file mode 100644
index 676eaaf8c1b..00000000000
--- a/db/migrate/20111025134235_add_high_label_to_issue.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddHighLabelToIssue < ActiveRecord::Migration
- def change
- add_column :issues, :critical, :boolean, :default => false, :null => false
- end
-end
diff --git a/db/migrate/20111027051828_add_expires_at_to_snippets.rb b/db/migrate/20111027051828_add_expires_at_to_snippets.rb
deleted file mode 100644
index 0d94b33376b..00000000000
--- a/db/migrate/20111027051828_add_expires_at_to_snippets.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddExpiresAtToSnippets < ActiveRecord::Migration
- def change
- add_column :snippets, :expires_at, :datetime
- end
-end
diff --git a/db/migrate/20111027142641_change_note_note_to_text.rb b/db/migrate/20111027142641_change_note_note_to_text.rb
deleted file mode 100644
index d762d361aec..00000000000
--- a/db/migrate/20111027142641_change_note_note_to_text.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-class ChangeNoteNoteToText < ActiveRecord::Migration
- def up
- change_column :notes, :note, :text
- end
-
- def down
- end
-end
diff --git a/db/migrate/20111027152724_issue_conten_to_note.rb b/db/migrate/20111027152724_issue_conten_to_note.rb
deleted file mode 100644
index 0677fee6b97..00000000000
--- a/db/migrate/20111027152724_issue_conten_to_note.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-class IssueContenToNote < ActiveRecord::Migration
- def up
- puts "Issue content is deprecated -> move to notes"
- Issue.find_each(:batch_size => 100) do |issue|
- next if issue.content.blank?
- note = Note.new(
- :note => issue.content,
- :project_id => issue.project_id,
- :noteable => issue,
- :created_at => issue.created_at,
- :updated_at => issue.created_at
- )
- note.author_id = issue.author_id
-
- if note.save
- issue.update_attributes(:content => nil)
- print "."
- else
- print "F"
- end
- end
-
- total = Issue.where("content is not null").count
-
- if total > 0
- puts "content of #{total} issues were not migrated"
- else
- puts "Done"
- end
- end
-
- def down
- end
-end
diff --git a/db/migrate/20111101222453_acts_as_taggable_on_migration.rb b/db/migrate/20111101222453_acts_as_taggable_on_migration.rb
deleted file mode 100644
index 16610615f9d..00000000000
--- a/db/migrate/20111101222453_acts_as_taggable_on_migration.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-class ActsAsTaggableOnMigration < ActiveRecord::Migration
- def self.up
- create_table :tags do |t|
- t.string :name
- end
-
- create_table :taggings do |t|
- t.references :tag
-
- # You should make sure that the column created is
- # long enough to store the required class names.
- t.references :taggable, :polymorphic => true
- t.references :tagger, :polymorphic => true
-
- t.string :context
-
- t.datetime :created_at
- end
-
- add_index :taggings, :tag_id
- add_index :taggings, [:taggable_id, :taggable_type, :context]
- end
-
- def self.down
- drop_table :taggings
- drop_table :tags
- end
-end
diff --git a/db/migrate/20111111093150_remove_content_from_issues.rb b/db/migrate/20111111093150_remove_content_from_issues.rb
deleted file mode 100644
index 30bcdfb543b..00000000000
--- a/db/migrate/20111111093150_remove_content_from_issues.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class RemoveContentFromIssues < ActiveRecord::Migration
- def up
- remove_column :issues, :content
- end
-
- def down
- add_column :issues, :content, :text
- end
-end
diff --git a/db/migrate/20111115063954_add_authentication_token_to_users.rb b/db/migrate/20111115063954_add_authentication_token_to_users.rb
deleted file mode 100644
index 84433656d6c..00000000000
--- a/db/migrate/20111115063954_add_authentication_token_to_users.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddAuthenticationTokenToUsers < ActiveRecord::Migration
- def change
- add_column :users, :authentication_token, :string
- end
-end
diff --git a/db/migrate/20111124115339_add_extra_field_to_issue.rb b/db/migrate/20111124115339_add_extra_field_to_issue.rb
deleted file mode 100644
index 4946c6fb0bc..00000000000
--- a/db/migrate/20111124115339_add_extra_field_to_issue.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddExtraFieldToIssue < ActiveRecord::Migration
- def change
- add_column :issues, :branch_name, :string, :null => true
- end
-end
diff --git a/db/migrate/20111127155345_create_merge_requests.rb b/db/migrate/20111127155345_create_merge_requests.rb
deleted file mode 100644
index 1555ae84041..00000000000
--- a/db/migrate/20111127155345_create_merge_requests.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-class CreateMergeRequests < ActiveRecord::Migration
- def change
- create_table :merge_requests do |t|
- t.string :target_branch, :null => false
- t.string :source_branch, :null => false
- t.integer :project_id, :null => false
- t.integer :author_id
- t.integer :assignee_id
- t.string :title
- t.boolean :closed, :default => false, :null => false
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20111206213842_add_advanced_rights_to_team_member.rb b/db/migrate/20111206213842_add_advanced_rights_to_team_member.rb
deleted file mode 100644
index e2695fdafa7..00000000000
--- a/db/migrate/20111206213842_add_advanced_rights_to_team_member.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-class AddAdvancedRightsToTeamMember < ActiveRecord::Migration
- def change
- add_column :users_projects, :repo_access, :integer, :default => 0, :null => false
- add_column :users_projects, :project_access, :integer, :default => 0, :null => false
- end
-end
diff --git a/db/migrate/20111206222316_migrate_to_new_rights.rb b/db/migrate/20111206222316_migrate_to_new_rights.rb
deleted file mode 100644
index 22e0c1ce994..00000000000
--- a/db/migrate/20111206222316_migrate_to_new_rights.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-class MigrateToNewRights < ActiveRecord::Migration
- def up
- # Repository access
- UsersProject.update_all("repo_access = 2", :write => true)
- UsersProject.update_all("repo_access = 1", :read => true, :write => false)
-
- # Project access
- UsersProject.update_all("project_access = 1", :read => true, :write => false, :admin => false)
- UsersProject.update_all("project_access = 2", :read => true, :write => true, :admin => false)
- UsersProject.update_all("project_access = 3", :read => true, :write => true, :admin => true)
-
- # Remove old fields
- remove_column :users_projects, :read
- remove_column :users_projects, :write
- remove_column :users_projects, :admin
- end
-
- def down
- end
-end
diff --git a/db/migrate/20111207211728_add_default_branch_to_project.rb b/db/migrate/20111207211728_add_default_branch_to_project.rb
deleted file mode 100644
index 5c2107f7aa5..00000000000
--- a/db/migrate/20111207211728_add_default_branch_to_project.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddDefaultBranchToProject < ActiveRecord::Migration
- def change
- add_column :projects, :default_branch, :string, :null => false, :default => "master"
- end
-end
diff --git a/db/migrate/20111214091851_create_web_hooks.rb b/db/migrate/20111214091851_create_web_hooks.rb
deleted file mode 100644
index c6ba89c10e1..00000000000
--- a/db/migrate/20111214091851_create_web_hooks.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class CreateWebHooks < ActiveRecord::Migration
- def change
- create_table :web_hooks do |t|
- t.string :url
- t.integer :project_id
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20111220190817_add_coloscheme_option_to_user.rb b/db/migrate/20111220190817_add_coloscheme_option_to_user.rb
deleted file mode 100644
index fe06c3aa34a..00000000000
--- a/db/migrate/20111220190817_add_coloscheme_option_to_user.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddColoschemeOptionToUser < ActiveRecord::Migration
- def change
- add_column :users, :dark_scheme, :boolean, :default => false, :null => false
- end
-end
diff --git a/db/migrate/20111231111825_add_project_id_to_key.rb b/db/migrate/20111231111825_add_project_id_to_key.rb
deleted file mode 100644
index dc80cbdb71f..00000000000
--- a/db/migrate/20111231111825_add_project_id_to_key.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-class AddProjectIdToKey < ActiveRecord::Migration
- def change
- add_column :keys, :project_id, :integer, :null => true
- change_column :keys, :user_id, :integer, :null => true
- end
-end
diff --git a/db/migrate/20120110180749_add_line_number_to_note.rb b/db/migrate/20120110180749_add_line_number_to_note.rb
deleted file mode 100644
index 9bdcce3c47d..00000000000
--- a/db/migrate/20120110180749_add_line_number_to_note.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddLineNumberToNote < ActiveRecord::Migration
- def change
- add_column :notes, :line_code, :string, :null => true
- end
-end
diff --git a/db/migrate/20120119202326_add_indexes.rb b/db/migrate/20120119202326_add_indexes.rb
deleted file mode 100644
index ee07176a267..00000000000
--- a/db/migrate/20120119202326_add_indexes.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class AddIndexes < ActiveRecord::Migration
- def change
- add_index :issues, :project_id
- add_index :merge_requests, :project_id
- add_index :notes, :noteable_id
- add_index :notes, :noteable_type
- end
-
-end
diff --git a/db/migrate/20120121122616_fix_noteable_id.rb b/db/migrate/20120121122616_fix_noteable_id.rb
deleted file mode 100644
index d110e8cd63b..00000000000
--- a/db/migrate/20120121122616_fix_noteable_id.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-class FixNoteableId < ActiveRecord::Migration
- def up
- change_column :notes, :noteable_id, :string, :limit => 255
- end
-
- def down
- end
-end
diff --git a/db/migrate/20120206170141_add_modularity_fields_to_project.rb b/db/migrate/20120206170141_add_modularity_fields_to_project.rb
deleted file mode 100644
index d63de0c2be3..00000000000
--- a/db/migrate/20120206170141_add_modularity_fields_to_project.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-class AddModularityFieldsToProject < ActiveRecord::Migration
- def change
- add_column :projects, :issues_enabled, :boolean, :null => false, :default => true
- add_column :projects, :wall_enabled, :boolean, :null => false, :default => true
- add_column :projects, :merge_requests_enabled, :boolean, :null => false, :default => true
- end
-end
diff --git a/db/migrate/20120215182305_create_protected_branches.rb b/db/migrate/20120215182305_create_protected_branches.rb
deleted file mode 100644
index 841d08c33d5..00000000000
--- a/db/migrate/20120215182305_create_protected_branches.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-class CreateProtectedBranches < ActiveRecord::Migration
- def change
- create_table :protected_branches do |t|
- t.integer :project_id, :null => false
- t.string :name, :null => false
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20120216085842_move_to_roles_permissions.rb b/db/migrate/20120216085842_move_to_roles_permissions.rb
deleted file mode 100644
index 36d02cf972a..00000000000
--- a/db/migrate/20120216085842_move_to_roles_permissions.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-class MoveToRolesPermissions < ActiveRecord::Migration
- def up
- repo_n = 0
- repo_r = 1
- repo_rw = 2
- project_rwa = 3
-
-
- # Build masters and reset repo_access
- UsersProject.update_all({:project_access => UsersProject::MASTER, :repo_access => 99 }, ["project_access = ?", project_rwa])
-
- # Build other roles based on repo access
- UsersProject.update_all ["project_access = ?", UsersProject::DEVELOPER], ["repo_access = ?", repo_rw]
- UsersProject.update_all ["project_access = ?", UsersProject::REPORTER], ["repo_access = ?", repo_r]
- UsersProject.update_all ["project_access = ?", UsersProject::GUEST], ["repo_access = ?", repo_n]
-
- remove_column :users_projects, :repo_access
- end
-
- def down
- end
-end
diff --git a/db/migrate/20120216215008_create_wikis.rb b/db/migrate/20120216215008_create_wikis.rb
deleted file mode 100644
index 38947df389c..00000000000
--- a/db/migrate/20120216215008_create_wikis.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-class CreateWikis < ActiveRecord::Migration
- def change
- create_table :wikis do |t|
- t.string :title
- t.text :content
- t.integer :project_id
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20120219130957_add_slug_to_wiki.rb b/db/migrate/20120219130957_add_slug_to_wiki.rb
deleted file mode 100644
index 5f2d5970a89..00000000000
--- a/db/migrate/20120219130957_add_slug_to_wiki.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-class AddSlugToWiki < ActiveRecord::Migration
- def change
- add_column :wikis, :slug, :string
-
- end
-end
diff --git a/db/migrate/20120219140810_add_wiki_enabled_to_project.rb b/db/migrate/20120219140810_add_wiki_enabled_to_project.rb
deleted file mode 100644
index ebd71bea84d..00000000000
--- a/db/migrate/20120219140810_add_wiki_enabled_to_project.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-class AddWikiEnabledToProject < ActiveRecord::Migration
- def change
- add_column :projects, :wiki_enabled, :boolean, :default => true, :null => false
-
- end
-end
diff --git a/db/migrate/20120219193300_add_user_to_wiki.rb b/db/migrate/20120219193300_add_user_to_wiki.rb
deleted file mode 100644
index 8a6c0a06ef0..00000000000
--- a/db/migrate/20120219193300_add_user_to_wiki.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-class AddUserToWiki < ActiveRecord::Migration
- def change
- add_column :wikis, :user_id, :integer
-
- end
-end
diff --git a/db/migrate/20120228130210_create_events.rb b/db/migrate/20120228130210_create_events.rb
deleted file mode 100644
index c01f557aaaa..00000000000
--- a/db/migrate/20120228130210_create_events.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-class CreateEvents < ActiveRecord::Migration
- def change
- create_table :events do |t|
- t.string :target_type, :null => true
- t.integer :target_id, :null => true
-
- t.string :title, :null => true
- t.text :data, :null => true
- t.integer :project_id, :null => true
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20120228134252_add_action_to_event.rb b/db/migrate/20120228134252_add_action_to_event.rb
deleted file mode 100644
index aade3d90a80..00000000000
--- a/db/migrate/20120228134252_add_action_to_event.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddActionToEvent < ActiveRecord::Migration
- def change
- add_column :events, :action, :integer, :null => true
- end
-end
diff --git a/db/migrate/20120301185805_add_theme_to_user.rb b/db/migrate/20120301185805_add_theme_to_user.rb
deleted file mode 100644
index 7c2e55692b0..00000000000
--- a/db/migrate/20120301185805_add_theme_to_user.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-class AddThemeToUser < ActiveRecord::Migration
- def change
- add_column :users, :theme_id, :integer, :null => false, :default => 1
-
- end
-end
diff --git a/db/migrate/20120307095918_add_author_id_to_event.rb b/db/migrate/20120307095918_add_author_id_to_event.rb
deleted file mode 100644
index 1d24d41e424..00000000000
--- a/db/migrate/20120307095918_add_author_id_to_event.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddAuthorIdToEvent < ActiveRecord::Migration
- def change
- add_column :events, :author_id, :integer, :null => true
- end
-end
diff --git a/db/migrate/20120315111711_add_commits_diff_store_to_merge_request.rb b/db/migrate/20120315111711_add_commits_diff_store_to_merge_request.rb
deleted file mode 100644
index 2dc1dfb4b6e..00000000000
--- a/db/migrate/20120315111711_add_commits_diff_store_to_merge_request.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-class AddCommitsDiffStoreToMergeRequest < ActiveRecord::Migration
- def change
- add_column :merge_requests, :st_commits, :text, :null => true
- add_column :merge_requests, :st_diffs, :text, :null => true
- end
-end
diff --git a/db/migrate/20120315132931_add_merged_to_merge_request.rb b/db/migrate/20120315132931_add_merged_to_merge_request.rb
deleted file mode 100644
index 2deb59e4420..00000000000
--- a/db/migrate/20120315132931_add_merged_to_merge_request.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddMergedToMergeRequest < ActiveRecord::Migration
- def change
- add_column :merge_requests, :merged, :boolean, :null => false, :default => false
- end
-end
diff --git a/db/migrate/20120317095543_add_description_to_issues.rb b/db/migrate/20120317095543_add_description_to_issues.rb
deleted file mode 100644
index e47e3f8e898..00000000000
--- a/db/migrate/20120317095543_add_description_to_issues.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddDescriptionToIssues < ActiveRecord::Migration
- def change
- add_column :issues, :description, :text
- end
-end
diff --git a/db/migrate/20120323221339_add_bio_field_to_user.rb b/db/migrate/20120323221339_add_bio_field_to_user.rb
deleted file mode 100644
index 80a4dec5971..00000000000
--- a/db/migrate/20120323221339_add_bio_field_to_user.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddBioFieldToUser < ActiveRecord::Migration
- def change
- add_column :users, :bio, :string, :null => true
- end
-end
diff --git a/db/migrate/20120329170745_add_automerge_to_merge_request.rb b/db/migrate/20120329170745_add_automerge_to_merge_request.rb
deleted file mode 100644
index de7c68ee1cb..00000000000
--- a/db/migrate/20120329170745_add_automerge_to_merge_request.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddAutomergeToMergeRequest < ActiveRecord::Migration
- def change
- add_column :merge_requests, :state, :integer, :null => false, :default => 1
- end
-end
diff --git a/db/migrate/20120405211750_increase_mr_text_column_size.rb b/db/migrate/20120405211750_increase_mr_text_column_size.rb
deleted file mode 100644
index 4fbef622da4..00000000000
--- a/db/migrate/20120405211750_increase_mr_text_column_size.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-class IncreaseMrTextColumnSize < ActiveRecord::Migration
- def up
- # MYSQL LARGETEXT for merge request
- change_column :merge_requests, :st_diffs, :text, :limit => 4294967295
- change_column :merge_requests, :st_commits, :text, :limit => 4294967295
- end
-
- def down
- end
-end
diff --git a/db/migrate/20120408180246_create_milestones.rb b/db/migrate/20120408180246_create_milestones.rb
deleted file mode 100644
index ed3a510d660..00000000000
--- a/db/migrate/20120408180246_create_milestones.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-class CreateMilestones < ActiveRecord::Migration
- def change
- create_table :milestones do |t|
- t.string :title, :null => false
- t.integer :project_id, :null => false
- t.text :description
- t.date :due_date
- t.boolean :closed, :default => false, :null => false
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20120408181910_add_milestone_id_to_issue.rb b/db/migrate/20120408181910_add_milestone_id_to_issue.rb
deleted file mode 100644
index a6b44090c1c..00000000000
--- a/db/migrate/20120408181910_add_milestone_id_to_issue.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddMilestoneIdToIssue < ActiveRecord::Migration
- def change
- add_column :issues, :milestone_id, :integer, :null => true
- end
-end
diff --git a/db/migrate/20120413135904_add_blocked_field_to_user.rb b/db/migrate/20120413135904_add_blocked_field_to_user.rb
deleted file mode 100644
index 050450bf034..00000000000
--- a/db/migrate/20120413135904_add_blocked_field_to_user.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddBlockedFieldToUser < ActiveRecord::Migration
- def change
- add_column :users, :blocked, :boolean, :null => false, :default => false
- end
-end
diff --git a/db/migrate/20120627145613_remove_critical_from_issue.rb b/db/migrate/20120627145613_remove_critical_from_issue.rb
deleted file mode 100644
index f8d0797197b..00000000000
--- a/db/migrate/20120627145613_remove_critical_from_issue.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class RemoveCriticalFromIssue < ActiveRecord::Migration
- def up
- remove_column :issues, :critical
- end
-
- def down
- add_column :issues, :critical, :boolean, :null => true, :default => false
- end
-end
diff --git a/db/migrate/20120706065612_add_lockable_to_users.rb b/db/migrate/20120706065612_add_lockable_to_users.rb
deleted file mode 100644
index cf86e660876..00000000000
--- a/db/migrate/20120706065612_add_lockable_to_users.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-class AddLockableToUsers < ActiveRecord::Migration
- def change
- add_column :users, :failed_attempts, :integer, :default => 0
- add_column :users, :locked_at, :datetime
- end
-end
diff --git a/db/migrate/20120712080407_add_type_to_web_hook.rb b/db/migrate/20120712080407_add_type_to_web_hook.rb
deleted file mode 100644
index 18ab024c817..00000000000
--- a/db/migrate/20120712080407_add_type_to_web_hook.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddTypeToWebHook < ActiveRecord::Migration
- def change
- add_column :web_hooks, :type, :string, :default => "ProjectHook"
- end
-end
diff --git a/db/migrate/20120729131232_add_extern_auth_provider_to_users.rb b/db/migrate/20120729131232_add_extern_auth_provider_to_users.rb
deleted file mode 100644
index d5e66ba4d3b..00000000000
--- a/db/migrate/20120729131232_add_extern_auth_provider_to_users.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-class AddExternAuthProviderToUsers < ActiveRecord::Migration
- def change
- add_column :users, :extern_uid, :string
- add_column :users, :provider, :string
-
- add_index :users, [:extern_uid, :provider], :unique => true
- end
-end
diff --git a/db/migrate/20120905043334_set_default_branch_default_to_nil.rb b/db/migrate/20120905043334_set_default_branch_default_to_nil.rb
deleted file mode 100644
index f5956fe8751..00000000000
--- a/db/migrate/20120905043334_set_default_branch_default_to_nil.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-class SetDefaultBranchDefaultToNil < ActiveRecord::Migration
- def up
- # Set the default_branch to allow nil, and default it to nil
- change_column_null(:projects, :default_branch, true)
- change_column_default(:projects, :default_branch, nil)
- end
-
- def down
- change_column_null(:projects, :default_branch, false)
- change_column_default(:projects, :default_branch, 'master')
- end
-end
diff --git a/db/migrate/20121002150926_create_groups.rb b/db/migrate/20121002150926_create_groups.rb
deleted file mode 100644
index ac178294c02..00000000000
--- a/db/migrate/20121002150926_create_groups.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-class CreateGroups < ActiveRecord::Migration
- def change
- create_table :groups do |t|
- t.string :name, null: false
- t.string :code, null: false
- t.integer :owner_id, null: false
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20121002151033_add_group_id_to_project.rb b/db/migrate/20121002151033_add_group_id_to_project.rb
deleted file mode 100644
index 683fbfec513..00000000000
--- a/db/migrate/20121002151033_add_group_id_to_project.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddGroupIdToProject < ActiveRecord::Migration
- def change
- add_column :projects, :group_id, :integer
- end
-end
diff --git a/db/migrate/20121009205010_postgres_create_integer_cast.rb b/db/migrate/20121009205010_postgres_create_integer_cast.rb
deleted file mode 100644
index b9a971387d1..00000000000
--- a/db/migrate/20121009205010_postgres_create_integer_cast.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-class PostgresCreateIntegerCast < ActiveRecord::Migration
- def up
- execute <<-SQL
- CREATE CAST (integer AS text) WITH INOUT AS IMPLICIT;
- SQL
- rescue ActiveRecord::StatementInvalid
- end
-
- def down
- execute <<-SQL
- DROP CAST (integer AS text);
- SQL
- rescue ActiveRecord::StatementInvalid
- end
-end
diff --git a/db/migrate/20121026114600_add_milestone_id_to_merge_requests.rb b/db/migrate/20121026114600_add_milestone_id_to_merge_requests.rb
deleted file mode 100644
index b5167724348..00000000000
--- a/db/migrate/20121026114600_add_milestone_id_to_merge_requests.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddMilestoneIdToMergeRequests < ActiveRecord::Migration
- def change
- add_column :merge_requests, :milestone_id, :integer, :null => true
- end
-end
diff --git a/db/migrate/20121119170638_create_services.rb b/db/migrate/20121119170638_create_services.rb
deleted file mode 100644
index f7cac1445a7..00000000000
--- a/db/migrate/20121119170638_create_services.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-class CreateServices < ActiveRecord::Migration
- def change
- create_table :services do |t|
- t.string :type
- t.string :title
- t.string :token
- t.integer :project_id, null: false
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20121120051432_add_service_id_to_web_hook.rb b/db/migrate/20121120051432_add_service_id_to_web_hook.rb
deleted file mode 100644
index 77adf92578f..00000000000
--- a/db/migrate/20121120051432_add_service_id_to_web_hook.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddServiceIdToWebHook < ActiveRecord::Migration
- def change
- add_column :web_hooks, :service_id, :integer, null: true
- end
-end
diff --git a/db/migrate/20121120103700_add_active_to_service.rb b/db/migrate/20121120103700_add_active_to_service.rb
deleted file mode 100644
index f45ef52e6f0..00000000000
--- a/db/migrate/20121120103700_add_active_to_service.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddActiveToService < ActiveRecord::Migration
- def change
- add_column :services, :active, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20121120113838_add_project_url_to_service.rb b/db/migrate/20121120113838_add_project_url_to_service.rb
deleted file mode 100644
index 13ffbdb192f..00000000000
--- a/db/migrate/20121120113838_add_project_url_to_service.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddProjectUrlToService < ActiveRecord::Migration
- def change
- add_column :services, :project_url, :string, null: true
- end
-end
diff --git a/db/migrate/20121122145155_convert_group_to_namespace.rb b/db/migrate/20121122145155_convert_group_to_namespace.rb
deleted file mode 100644
index fc8b023d814..00000000000
--- a/db/migrate/20121122145155_convert_group_to_namespace.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class ConvertGroupToNamespace < ActiveRecord::Migration
- def up
- rename_table 'groups', 'namespaces'
- add_column :namespaces, :type, :string, null: true
-
- # Migrate old groups
- Namespace.update_all(type: 'Group')
- end
-
- def down
- raise 'Rollback is not allowed'
- end
-end
diff --git a/db/migrate/20121122150932_add_namespace_id_to_project.rb b/db/migrate/20121122150932_add_namespace_id_to_project.rb
deleted file mode 100644
index 904f3aa32be..00000000000
--- a/db/migrate/20121122150932_add_namespace_id_to_project.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddNamespaceIdToProject < ActiveRecord::Migration
- def change
- rename_column :projects, :group_id, :namespace_id
- end
-end
diff --git a/db/migrate/20121123104937_add_username_to_user.rb b/db/migrate/20121123104937_add_username_to_user.rb
deleted file mode 100644
index 04232a119d9..00000000000
--- a/db/migrate/20121123104937_add_username_to_user.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddUsernameToUser < ActiveRecord::Migration
- def change
- add_column :users, :username, :string, null: true
- end
-end
diff --git a/db/migrate/20121123164910_rename_code_to_path.rb b/db/migrate/20121123164910_rename_code_to_path.rb
deleted file mode 100644
index fb10baf58cf..00000000000
--- a/db/migrate/20121123164910_rename_code_to_path.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-class RenameCodeToPath < ActiveRecord::Migration
- def up
- remove_column :projects, :code
- rename_column :namespaces, :code, :path
- end
-
- def down
- add_column :projects, :code, :string
- rename_column :namespaces, :path, :code
- end
-end
diff --git a/db/migrate/20121203154450_add_events_indices.rb b/db/migrate/20121203154450_add_events_indices.rb
deleted file mode 100644
index 502a2ccbcda..00000000000
--- a/db/migrate/20121203154450_add_events_indices.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-class AddEventsIndices < ActiveRecord::Migration
- def change
- add_index :events, :project_id
- add_index :events, :author_id
- add_index :events, :action
- add_index :events, :target_type
- end
-end
diff --git a/db/migrate/20121203160507_more_indices.rb b/db/migrate/20121203160507_more_indices.rb
deleted file mode 100644
index 52170a7c597..00000000000
--- a/db/migrate/20121203160507_more_indices.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-class MoreIndices < ActiveRecord::Migration
- def change
- add_index :notes, :project_id
- add_index :namespaces, :owner_id
- add_index :keys, :user_id
-
- add_index :projects, :namespace_id
- add_index :projects, :owner_id
-
- add_index :services, :project_id
- add_index :snippets, :project_id
-
- add_index :users_projects, :project_id
-
- # Issues
- add_index :issues, :assignee_id
- add_index :issues, :milestone_id
- add_index :issues, :author_id
-
- # Merge Requests
- add_index :merge_requests, :assignee_id
- add_index :merge_requests, :milestone_id
- add_index :merge_requests, :author_id
-
- end
-end
diff --git a/db/migrate/20121205201726_add_more_indexes.rb b/db/migrate/20121205201726_add_more_indexes.rb
deleted file mode 100644
index a2b36f7fdf9..00000000000
--- a/db/migrate/20121205201726_add_more_indexes.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-class AddMoreIndexes < ActiveRecord::Migration
- def change
- add_index :events, :created_at
- add_index :events, :target_id
-
- add_index :issues, :closed
- add_index :issues, :created_at
- add_index :issues, :title
-
- add_index :keys, :identifier
- # FIXME: MySQL can't index text columns
- #add_index :keys, :key
- add_index :keys, :project_id
-
- add_index :merge_requests, :closed
- add_index :merge_requests, :created_at
- add_index :merge_requests, :source_branch
- add_index :merge_requests, :target_branch
- add_index :merge_requests, :title
-
- add_index :milestones, :due_date
- add_index :milestones, :project_id
-
- add_index :namespaces, :name
- add_index :namespaces, :path
- add_index :namespaces, :type
-
- add_index :notes, :created_at
-
- add_index :snippets, :created_at
- add_index :snippets, :expires_at
-
- add_index :users, :admin
- add_index :users, :blocked
- add_index :users, :name
- add_index :users, :username
-
- add_index :users_projects, :project_access
- add_index :users_projects, :user_id
-
- add_index :wikis, :project_id
- add_index :wikis, :slug
- end
-end
diff --git a/db/migrate/20121218164840_move_noteable_commit_to_own_field.rb b/db/migrate/20121218164840_move_noteable_commit_to_own_field.rb
deleted file mode 100644
index 6f2da4136a3..00000000000
--- a/db/migrate/20121218164840_move_noteable_commit_to_own_field.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-class MoveNoteableCommitToOwnField < ActiveRecord::Migration
- def up
- add_column :notes, :commit_id, :string, null: true
- add_column :notes, :new_noteable_id, :integer, null: true
- Note.where(noteable_type: 'Commit').update_all('commit_id = noteable_id')
-
- if ActiveRecord::Base.connection.adapter_name == 'PostgreSQL'
- Note.where("noteable_type != 'Commit'").update_all('new_noteable_id = CAST (noteable_id AS INTEGER)')
- else
- Note.where("noteable_type != 'Commit'").update_all('new_noteable_id = noteable_id')
- end
-
- remove_column :notes, :noteable_id
- rename_column :notes, :new_noteable_id, :noteable_id
- end
-
- def down
- raise ActiveRecord::IrreversibleMigration
- end
-end
diff --git a/db/migrate/20121219095402_indices_for_notes.rb b/db/migrate/20121219095402_indices_for_notes.rb
deleted file mode 100644
index 4c5d041ce81..00000000000
--- a/db/migrate/20121219095402_indices_for_notes.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-class IndicesForNotes < ActiveRecord::Migration
- def change
- add_index :notes, :commit_id
- add_index :notes, [:project_id, :noteable_type]
- end
-end
diff --git a/db/migrate/20121219183753_create_user_teams.rb b/db/migrate/20121219183753_create_user_teams.rb
deleted file mode 100644
index 65c4d053982..00000000000
--- a/db/migrate/20121219183753_create_user_teams.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-class CreateUserTeams < ActiveRecord::Migration
- def change
- create_table :user_teams do |t|
- t.string :name
- t.string :path
- t.integer :owner_id
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20121220064104_create_user_team_project_relationships.rb b/db/migrate/20121220064104_create_user_team_project_relationships.rb
deleted file mode 100644
index 8eb654c8728..00000000000
--- a/db/migrate/20121220064104_create_user_team_project_relationships.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-class CreateUserTeamProjectRelationships < ActiveRecord::Migration
- def change
- create_table :user_team_project_relationships do |t|
- t.integer :project_id
- t.integer :user_team_id
- t.integer :greatest_access
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20121220064453_create_user_team_user_relationships.rb b/db/migrate/20121220064453_create_user_team_user_relationships.rb
deleted file mode 100644
index 7783b0ae432..00000000000
--- a/db/migrate/20121220064453_create_user_team_user_relationships.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-class CreateUserTeamUserRelationships < ActiveRecord::Migration
- def change
- create_table :user_team_user_relationships do |t|
- t.integer :user_id
- t.integer :user_team_id
- t.boolean :group_admin
- t.integer :permission
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20121220064453_init_schema.rb b/db/migrate/20121220064453_init_schema.rb
new file mode 100644
index 00000000000..90f5eb08e8c
--- /dev/null
+++ b/db/migrate/20121220064453_init_schema.rb
@@ -0,0 +1,306 @@
+class InitSchema < ActiveRecord::Migration
+ def up
+
+ create_table "events", force: true do |t|
+ t.string "target_type"
+ t.integer "target_id"
+ t.string "title"
+ t.text "data"
+ t.integer "project_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.integer "action"
+ t.integer "author_id"
+ end
+
+ add_index "events", ["action"], name: "index_events_on_action", using: :btree
+ add_index "events", ["author_id"], name: "index_events_on_author_id", using: :btree
+ add_index "events", ["created_at"], name: "index_events_on_created_at", using: :btree
+ add_index "events", ["project_id"], name: "index_events_on_project_id", using: :btree
+ add_index "events", ["target_id"], name: "index_events_on_target_id", using: :btree
+ add_index "events", ["target_type"], name: "index_events_on_target_type", using: :btree
+
+ create_table "issues", force: true do |t|
+ t.string "title"
+ t.integer "assignee_id"
+ t.integer "author_id"
+ t.integer "project_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.boolean "closed", default: false, null: false
+ t.integer "position", default: 0
+ t.string "branch_name"
+ t.text "description"
+ t.integer "milestone_id"
+ end
+
+ add_index "issues", ["assignee_id"], name: "index_issues_on_assignee_id", using: :btree
+ add_index "issues", ["author_id"], name: "index_issues_on_author_id", using: :btree
+ add_index "issues", ["closed"], name: "index_issues_on_closed", using: :btree
+ add_index "issues", ["created_at"], name: "index_issues_on_created_at", using: :btree
+ add_index "issues", ["milestone_id"], name: "index_issues_on_milestone_id", using: :btree
+ add_index "issues", ["project_id"], name: "index_issues_on_project_id", using: :btree
+ add_index "issues", ["title"], name: "index_issues_on_title", using: :btree
+
+ create_table "keys", force: true do |t|
+ t.integer "user_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.text "key"
+ t.string "title"
+ t.string "identifier"
+ t.integer "project_id"
+ end
+
+ add_index "keys", ["identifier"], name: "index_keys_on_identifier", using: :btree
+ add_index "keys", ["project_id"], name: "index_keys_on_project_id", using: :btree
+ add_index "keys", ["user_id"], name: "index_keys_on_user_id", using: :btree
+
+ create_table "merge_requests", force: true do |t|
+ t.string "target_branch", null: false
+ t.string "source_branch", null: false
+ t.integer "project_id", null: false
+ t.integer "author_id"
+ t.integer "assignee_id"
+ t.string "title"
+ t.boolean "closed", default: false, null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.text "st_commits", limit: 2147483647
+ t.text "st_diffs", limit: 2147483647
+ t.boolean "merged", default: false, null: false
+ t.integer "state", default: 1, null: false
+ t.integer "milestone_id"
+ end
+
+ add_index "merge_requests", ["assignee_id"], name: "index_merge_requests_on_assignee_id", using: :btree
+ add_index "merge_requests", ["author_id"], name: "index_merge_requests_on_author_id", using: :btree
+ add_index "merge_requests", ["closed"], name: "index_merge_requests_on_closed", using: :btree
+ add_index "merge_requests", ["created_at"], name: "index_merge_requests_on_created_at", using: :btree
+ add_index "merge_requests", ["milestone_id"], name: "index_merge_requests_on_milestone_id", using: :btree
+ add_index "merge_requests", ["project_id"], name: "index_merge_requests_on_project_id", using: :btree
+ add_index "merge_requests", ["source_branch"], name: "index_merge_requests_on_source_branch", using: :btree
+ add_index "merge_requests", ["target_branch"], name: "index_merge_requests_on_target_branch", using: :btree
+ add_index "merge_requests", ["title"], name: "index_merge_requests_on_title", using: :btree
+
+ create_table "milestones", force: true do |t|
+ t.string "title", null: false
+ t.integer "project_id", null: false
+ t.text "description"
+ t.date "due_date"
+ t.boolean "closed", default: false, null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "milestones", ["due_date"], name: "index_milestones_on_due_date", using: :btree
+ add_index "milestones", ["project_id"], name: "index_milestones_on_project_id", using: :btree
+
+ create_table "namespaces", force: true do |t|
+ t.string "name", null: false
+ t.string "path", null: false
+ t.integer "owner_id", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "type"
+ end
+
+ add_index "namespaces", ["name"], name: "index_namespaces_on_name", using: :btree
+ add_index "namespaces", ["owner_id"], name: "index_namespaces_on_owner_id", using: :btree
+ add_index "namespaces", ["path"], name: "index_namespaces_on_path", using: :btree
+ add_index "namespaces", ["type"], name: "index_namespaces_on_type", using: :btree
+
+ create_table "notes", force: true do |t|
+ t.text "note"
+ t.string "noteable_type"
+ t.integer "author_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.integer "project_id"
+ t.string "attachment"
+ t.string "line_code"
+ t.string "commit_id"
+ t.integer "noteable_id"
+ end
+
+ add_index "notes", ["commit_id"], name: "index_notes_on_commit_id", using: :btree
+ add_index "notes", ["created_at"], name: "index_notes_on_created_at", using: :btree
+ add_index "notes", ["noteable_type"], name: "index_notes_on_noteable_type", using: :btree
+ add_index "notes", ["project_id", "noteable_type"], name: "index_notes_on_project_id_and_noteable_type", using: :btree
+ add_index "notes", ["project_id"], name: "index_notes_on_project_id", using: :btree
+
+ create_table "projects", force: true do |t|
+ t.string "name"
+ t.string "path"
+ t.text "description"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.boolean "private_flag", default: true, null: false
+ t.integer "owner_id"
+ t.string "default_branch"
+ t.boolean "issues_enabled", default: true, null: false
+ t.boolean "wall_enabled", default: true, null: false
+ t.boolean "merge_requests_enabled", default: true, null: false
+ t.boolean "wiki_enabled", default: true, null: false
+ t.integer "namespace_id"
+ end
+
+ add_index "projects", ["namespace_id"], name: "index_projects_on_namespace_id", using: :btree
+ add_index "projects", ["owner_id"], name: "index_projects_on_owner_id", using: :btree
+
+ create_table "protected_branches", force: true do |t|
+ t.integer "project_id", null: false
+ t.string "name", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "services", force: true do |t|
+ t.string "type"
+ t.string "title"
+ t.string "token"
+ t.integer "project_id", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.boolean "active", default: false, null: false
+ t.string "project_url"
+ end
+
+ add_index "services", ["project_id"], name: "index_services_on_project_id", using: :btree
+
+ create_table "snippets", force: true do |t|
+ t.string "title"
+ t.text "content"
+ t.integer "author_id", null: false
+ t.integer "project_id", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "file_name"
+ t.datetime "expires_at"
+ end
+
+ add_index "snippets", ["created_at"], name: "index_snippets_on_created_at", using: :btree
+ add_index "snippets", ["expires_at"], name: "index_snippets_on_expires_at", using: :btree
+ add_index "snippets", ["project_id"], name: "index_snippets_on_project_id", using: :btree
+
+ create_table "taggings", force: true do |t|
+ t.integer "tag_id"
+ t.integer "taggable_id"
+ t.string "taggable_type"
+ t.integer "tagger_id"
+ t.string "tagger_type"
+ t.string "context"
+ t.datetime "created_at"
+ end
+
+ add_index "taggings", ["tag_id"], name: "index_taggings_on_tag_id", using: :btree
+ add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree
+
+ create_table "tags", force: true do |t|
+ t.string "name"
+ end
+
+ create_table "user_team_project_relationships", force: true do |t|
+ t.integer "project_id"
+ t.integer "user_team_id"
+ t.integer "greatest_access"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "user_team_user_relationships", force: true do |t|
+ t.integer "user_id"
+ t.integer "user_team_id"
+ t.boolean "group_admin"
+ t.integer "permission"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "user_teams", force: true do |t|
+ t.string "name"
+ t.string "path"
+ t.integer "owner_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "users", force: true do |t|
+ t.string "email", default: "", null: false
+ t.string "encrypted_password", default: "", null: false
+ t.string "reset_password_token"
+ t.datetime "reset_password_sent_at"
+ t.datetime "remember_created_at"
+ t.integer "sign_in_count", default: 0
+ t.datetime "current_sign_in_at"
+ t.datetime "last_sign_in_at"
+ t.string "current_sign_in_ip"
+ t.string "last_sign_in_ip"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "name"
+ t.boolean "admin", default: false, null: false
+ t.integer "projects_limit", default: 10
+ t.string "skype", default: "", null: false
+ t.string "linkedin", default: "", null: false
+ t.string "twitter", default: "", null: false
+ t.string "authentication_token"
+ t.boolean "dark_scheme", default: false, null: false
+ t.integer "theme_id", default: 1, null: false
+ t.string "bio"
+ t.boolean "blocked", default: false, null: false
+ t.integer "failed_attempts", default: 0
+ t.datetime "locked_at"
+ t.string "extern_uid"
+ t.string "provider"
+ t.string "username"
+ end
+
+ add_index "users", ["admin"], name: "index_users_on_admin", using: :btree
+ add_index "users", ["blocked"], name: "index_users_on_blocked", using: :btree
+ add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
+ add_index "users", ["extern_uid", "provider"], name: "index_users_on_extern_uid_and_provider", unique: true, using: :btree
+ add_index "users", ["name"], name: "index_users_on_name", using: :btree
+ add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
+ add_index "users", ["username"], name: "index_users_on_username", using: :btree
+
+ create_table "users_projects", force: true do |t|
+ t.integer "user_id", null: false
+ t.integer "project_id", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.integer "project_access", default: 0, null: false
+ end
+
+ add_index "users_projects", ["project_access"], name: "index_users_projects_on_project_access", using: :btree
+ add_index "users_projects", ["project_id"], name: "index_users_projects_on_project_id", using: :btree
+ add_index "users_projects", ["user_id"], name: "index_users_projects_on_user_id", using: :btree
+
+ create_table "web_hooks", force: true do |t|
+ t.string "url"
+ t.integer "project_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "type", default: "ProjectHook"
+ t.integer "service_id"
+ end
+
+ create_table "wikis", force: true do |t|
+ t.string "title"
+ t.text "content"
+ t.integer "project_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "slug"
+ t.integer "user_id"
+ end
+
+ add_index "wikis", ["project_id"], name: "index_wikis_on_project_id", using: :btree
+ add_index "wikis", ["slug"], name: "index_wikis_on_slug", using: :btree
+
+ end
+
+ def down
+ raise "Can not revert initial migration"
+ end
+end