|
| 1 | +class EnforceModelsConstraints < ActiveRecord::Migration |
| 2 | + |
| 3 | + def self.up |
| 4 | + |
| 5 | + change_column :git_caches, :repo_identifier, :string, :null => false, :after => :id |
| 6 | + change_column :git_caches, :command, :text, :null => false |
| 7 | + change_column :git_caches, :command_output, :binary, :null => false |
| 8 | + |
| 9 | + change_column :gitolite_public_keys, :user_id, :integer, :null => false, :after => :id |
| 10 | + change_column :gitolite_public_keys, :key_type, :integer, :null => false, :after => :user_id |
| 11 | + change_column :gitolite_public_keys, :title, :string, :null => false |
| 12 | + change_column :gitolite_public_keys, :identifier, :string, :null => false |
| 13 | + change_column :gitolite_public_keys, :key, :string, :null => false |
| 14 | + change_column :gitolite_public_keys, :active, :boolean, :default => true |
| 15 | + change_column :gitolite_public_keys, :delete_when_unused, :boolean, :default => true, :after => :active |
| 16 | + |
| 17 | + change_column :repository_deployment_credentials, :repository_id, :integer, :null => false |
| 18 | + change_column :repository_deployment_credentials, :gitolite_public_key_id, :integer, :null => false |
| 19 | + change_column :repository_deployment_credentials, :user_id, :integer, :null => false |
| 20 | + change_column :repository_deployment_credentials, :active, :boolean, :default => true |
| 21 | + |
| 22 | + change_column :repository_git_config_keys, :repository_id, :integer, :null => false |
| 23 | + change_column :repository_git_config_keys, :key, :string, :null => false |
| 24 | + change_column :repository_git_config_keys, :value, :string, :null => false |
| 25 | + |
| 26 | + change_column :repository_git_extras, :repository_id, :integer, :null => false |
| 27 | + change_column :repository_git_extras, :key, :string, :null => false |
| 28 | + change_column :repository_git_extras, :git_daemon, :boolean, :default => false |
| 29 | + change_column :repository_git_extras, :git_notify, :boolean, :default => false |
| 30 | + |
| 31 | + change_column :repository_git_notifications, :repository_id, :integer, :null => false |
| 32 | + |
| 33 | + change_column :repository_mirrors, :repository_id, :integer, :null => false, :after => :id |
| 34 | + change_column :repository_mirrors, :url, :string, :null => false, :after => :repository_id |
| 35 | + change_column :repository_mirrors, :active, :boolean, :default => true |
| 36 | + remove_column :repository_mirrors, :created_at |
| 37 | + remove_column :repository_mirrors, :updated_at |
| 38 | + |
| 39 | + change_column :repository_post_receive_urls, :repository_id, :integer, :null => false, :after => :id |
| 40 | + change_column :repository_post_receive_urls, :url, :string, :null => false, :after => :repository_id |
| 41 | + change_column :repository_post_receive_urls, :mode, :string, :null => false, :after => :url |
| 42 | + change_column :repository_post_receive_urls, :active, :boolean, :default => true |
| 43 | + remove_column :repository_post_receive_urls, :created_at |
| 44 | + remove_column :repository_post_receive_urls, :updated_at |
| 45 | + |
| 46 | + end |
| 47 | + |
| 48 | +end |
0 commit comments