diff --git a/db/migrate/20110913200833_devise_create_users.rb b/db/migrate/20110913200833_devise_create_users.rb
deleted file mode 100644
index e00f275c55d272e9d4445e486fd3cc99e76a1273..0000000000000000000000000000000000000000
--- 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 45b76f955637fb1519dd54a981461869c692463d..0000000000000000000000000000000000000000
--- 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 a89798ae86f6382a661901d1caaa8613e419ae89..0000000000000000000000000000000000000000
--- 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 73c0b9df8348de4eb53c81aba2509acb88d6b478..0000000000000000000000000000000000000000
--- 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 d4615b4babf32501217acde33632cde9633cfd44..0000000000000000000000000000000000000000
--- 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 74142b05cb5fec1365bae83108b498b522b1d208..0000000000000000000000000000000000000000
--- 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 b2eaa51cccf6799589ab01707e9364e46f62f6e0..0000000000000000000000000000000000000000
--- 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 e572793952aa43621c7dd331891f9cf70061b530..0000000000000000000000000000000000000000
--- 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 63b42ad998eb500652f79af58925b564f73f9b79..0000000000000000000000000000000000000000
--- 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 f54a02bd70a61234a00707a36fdbb2eb636a512d..0000000000000000000000000000000000000000
--- 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 c53bf46ef7296a312776f39b92358419d749dd43..0000000000000000000000000000000000000000
--- 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 3c743aa2874433b051f8d8f3ea83dd1935bea492..0000000000000000000000000000000000000000
--- 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 321587e6957626d8bef79658c1fef358fd0d1d38..0000000000000000000000000000000000000000
--- 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 aac9ff7888ce7b27e7caacff2560c199a504788c..0000000000000000000000000000000000000000
--- 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 72a0e817617065ad35d2fd9a806a6ec5468cba7e..0000000000000000000000000000000000000000
--- 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 3e641089799e2fcc69d90cd764de8b31170ae085..0000000000000000000000000000000000000000
--- 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 dc9d1f0171a229a3baf16cc4b219a8c050f58925..0000000000000000000000000000000000000000
--- 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 37d9cf10258f8abeb2efbb25fd384cb786ced669..0000000000000000000000000000000000000000
--- 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 82bd94b80897358a8d7e57704397bd3f87f593ef..0000000000000000000000000000000000000000
--- 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 8d265533add849bd479a0f044da7e7e2d6310171..0000000000000000000000000000000000000000
--- 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 8eb8382b51558225eda7b3914658684d76330a1b..0000000000000000000000000000000000000000
--- 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 614520063970cde301736802952cf77e8ac6752a..0000000000000000000000000000000000000000
--- 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 41451a0cabb971d6d43f9cf35ca02abf85e58508..0000000000000000000000000000000000000000
--- 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 9b0bf201cbaf4ae8dde65b5f8ceba62e718990a2..0000000000000000000000000000000000000000
--- 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 511a6793f4ff978ca874f0ada79a250b8b67212d..0000000000000000000000000000000000000000
--- 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 d378d225ec1b580b2a0fe964d8a704642a8f1d17..0000000000000000000000000000000000000000
--- 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 b0ffe5366a40333b1b72698a6d36f0f5459e5bf4..0000000000000000000000000000000000000000
--- 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 6e506c1cf9d3c7488d22e432e3dddf55e893af22..0000000000000000000000000000000000000000
--- 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 676eaaf8c1ba1de5dfa273dc3229da7fae5d2152..0000000000000000000000000000000000000000
--- 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 0d94b33376b2c0de4a99080f40535825581478f5..0000000000000000000000000000000000000000
--- 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 d762d361aecf81462249bd466846330994127c74..0000000000000000000000000000000000000000
--- 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 0677fee6b9736b9a09c9947b21436c755db08e5a..0000000000000000000000000000000000000000
--- 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 16610615f9d6b9bc5ed5b5c78375391f7eb448a8..0000000000000000000000000000000000000000
--- 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 30bcdfb543ba15a72d6537722064848e70929ddf..0000000000000000000000000000000000000000
--- 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 84433656d6c8d9b058a070f26cd6800a0f5227e7..0000000000000000000000000000000000000000
--- 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 4946c6fb0bcddbab32c84151719945cbeb4a9dcc..0000000000000000000000000000000000000000
--- 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 1555ae84041cd9f7f69803e30d9e437fc74cb455..0000000000000000000000000000000000000000
--- 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 e2695fdafa75e72e7e97a44773300983e9245660..0000000000000000000000000000000000000000
--- 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 22e0c1ce994731e9cfa0058295b7f3a338408d0b..0000000000000000000000000000000000000000
--- 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 5c2107f7aa57ae5f8d7fb236784f54e77aeb1538..0000000000000000000000000000000000000000
--- 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 c6ba89c10e1da9214be3ac38ab6f84afb7f88fc3..0000000000000000000000000000000000000000
--- 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 fe06c3aa34a6307b96b7e2830ab64b3f6fc48529..0000000000000000000000000000000000000000
--- 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 dc80cbdb71ff5a6c09e8dfeac9fb517c103cdb72..0000000000000000000000000000000000000000
--- 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 9bdcce3c47df4308efbd2784a1616db43513d35a..0000000000000000000000000000000000000000
--- 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 ee07176a26752ee0f018ebb8f14d039551362a08..0000000000000000000000000000000000000000
--- 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 d110e8cd63b7d80583c4a87930cea18861c41603..0000000000000000000000000000000000000000
--- 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 d63de0c2be3578fb83bc87485c9115321e968d4a..0000000000000000000000000000000000000000
--- 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 841d08c33d5f135b0463541909a85e3d11e162e3..0000000000000000000000000000000000000000
--- 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 36d02cf972a7381fadab3d4f891c3778850dc26d..0000000000000000000000000000000000000000
--- 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 38947df389cca5bcbc0bb8e21376fe46428b6c10..0000000000000000000000000000000000000000
--- 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 5f2d5970a89053a2ed49e66b30806ff7db1f6226..0000000000000000000000000000000000000000
--- 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 ebd71bea84d26a6b5485c8e0c7de4a0d3a327008..0000000000000000000000000000000000000000
--- 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 8a6c0a06ef00d3b870805f78524219b8576538aa..0000000000000000000000000000000000000000
--- 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 c01f557aaaa28838ce5654581db77ead22632807..0000000000000000000000000000000000000000
--- 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 aade3d90a8012fcc4d2ebee2364438ba610f05a9..0000000000000000000000000000000000000000
--- 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 7c2e55692b0bfe555e968d95d882ef0ddf00352f..0000000000000000000000000000000000000000
--- 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 1d24d41e424c550abd934e90d584fa4704fcd509..0000000000000000000000000000000000000000
--- 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 2dc1dfb4b6ea23dde2bc2d95bdbfc9209d9b1285..0000000000000000000000000000000000000000
--- 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 2deb59e4420763acdd535d95d8f7501b9f526286..0000000000000000000000000000000000000000
--- 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 e47e3f8e898cc642ce71bc3d34bad2a387e4d270..0000000000000000000000000000000000000000
--- 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 80a4dec5971c1718180758f3a566e8f14ced04a8..0000000000000000000000000000000000000000
--- 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 de7c68ee1cbd868ca54b7da0217ab9681da4c13b..0000000000000000000000000000000000000000
--- 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 4fbef622da4db7f6a69300d7c193470c7363dcfd..0000000000000000000000000000000000000000
--- 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 ed3a510d660b4225af1bfd5e1a0427ae5b665725..0000000000000000000000000000000000000000
--- 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 a6b44090c1c7433ca8bd84ca11a9a60dfb9c5d85..0000000000000000000000000000000000000000
--- 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 050450bf034d2c855cafb31ce253703c7e726d91..0000000000000000000000000000000000000000
--- 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 f8d0797197b745c12eb1ab2dbedc3e120d6b4de3..0000000000000000000000000000000000000000
--- 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 cf86e66087624b1d8fcf75dc01c0519bbbdc1783..0000000000000000000000000000000000000000
--- 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 18ab024c817d438a9354cc7436eac77ee89fd176..0000000000000000000000000000000000000000
--- 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 d5e66ba4d3bc83d5c7d8d9f92dd1983b4e0e6dde..0000000000000000000000000000000000000000
--- 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 f5956fe875184473481fe8673e57a9bab967c95e..0000000000000000000000000000000000000000
--- 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 ac178294c0279c2bc106f5cacb587e06b2a89acb..0000000000000000000000000000000000000000
--- 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 683fbfec5137edf7ff84e38c0b0aee315d19dcb7..0000000000000000000000000000000000000000
--- 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 b9a971387d1c8e5d33194af38d924e7dc0552265..0000000000000000000000000000000000000000
--- 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 b516772434870c85dc76134146188afe4d0a0f8c..0000000000000000000000000000000000000000
--- 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 f7cac1445a78adba9728fe0946bb51799f54b804..0000000000000000000000000000000000000000
--- 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 77adf92578ff0829e85eba7a46ef169330aa1940..0000000000000000000000000000000000000000
--- 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 f45ef52e6f06b59a188af02de0099e01c100e8e8..0000000000000000000000000000000000000000
--- 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 13ffbdb192f4152898e8827e473eba7b9ac4590d..0000000000000000000000000000000000000000
--- 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 fc8b023d814f3694329d36d06190d94706be77d5..0000000000000000000000000000000000000000
--- 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 904f3aa32be7ba5a6edfa0201ba5cf12cd13f9f0..0000000000000000000000000000000000000000
--- 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 04232a119d92b6e651753df4f06aefd6aa51018f..0000000000000000000000000000000000000000
--- 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 fb10baf58cf4660fdbd18a81d9882ff142892a1b..0000000000000000000000000000000000000000
--- 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 502a2ccbcdab0bba3d23b38873d18ae7071e9be9..0000000000000000000000000000000000000000
--- 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 52170a7c597dd8bc7c87e52d09ab5cd0909b9df1..0000000000000000000000000000000000000000
--- 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 a2b36f7fdf9a4bac17ebf5b64e1181f577a58cc0..0000000000000000000000000000000000000000
--- 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 6f2da4136a3cad9623e68ce7c6021abbe3358ad2..0000000000000000000000000000000000000000
--- 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 4c5d041ce815eada2db44b572a5eb75973ce58a7..0000000000000000000000000000000000000000
--- 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 65c4d053982cadce45061357bc18b95c89dbf541..0000000000000000000000000000000000000000
--- 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 8eb654c8728ba6d1a06308f2b3253d8b4df7a6c8..0000000000000000000000000000000000000000
--- 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 7783b0ae4328ff8d1b1d7958f3708d0b6749a29b..0000000000000000000000000000000000000000
--- 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 0000000000000000000000000000000000000000..90f5eb08e8cdaf539a99f3c469e27977c6ae1908
--- /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