diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-23 22:11:09 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-23 22:11:09 +0400 |
commit | c50ec72b52e9ed7270f7c81c2c71fd8e5a28eeb0 (patch) | |
tree | 48c30a44b85b84a4231bff84e51133e7812b55ca /db | |
parent | ab9d02365181df373beffbe7732b36b9b3f7a307 (diff) |
Deprecate code for Project. Use title and path
Diffstat (limited to 'db')
-rw-r--r-- | db/fixtures/development/001_admin.rb | 9 | ||||
-rw-r--r-- | db/fixtures/development/003_users.rb | 16 | ||||
-rw-r--r-- | db/fixtures/production/001_admin.rb | 9 | ||||
-rw-r--r-- | db/migrate/20121123164910_rename_code_to_path.rb | 11 | ||||
-rw-r--r-- | db/schema.rb | 5 |
5 files changed, 31 insertions, 19 deletions
diff --git a/db/fixtures/development/001_admin.rb b/db/fixtures/development/001_admin.rb index c857f6bcb3f..51939e8ee9c 100644 --- a/db/fixtures/development/001_admin.rb +++ b/db/fixtures/development/001_admin.rb @@ -1,9 +1,10 @@ unless User.count > 0 admin = User.create( - :email => "admin@local.host", - :name => "Administrator", - :password => "5iveL!fe", - :password_confirmation => "5iveL!fe" + email: "admin@local.host", + name: "Administrator", + username: 'root', + password: "5iveL!fe", + password_confirmation: "5iveL!fe" ) admin.projects_limit = 10000 diff --git a/db/fixtures/development/003_users.rb b/db/fixtures/development/003_users.rb index 309eb90b1bf..25705f1b726 100644 --- a/db/fixtures/development/003_users.rb +++ b/db/fixtures/development/003_users.rb @@ -1,11 +1,11 @@ User.seed(:id, [ - { :id => 2, :name => Faker::Internet.user_name, :email => Faker::Internet.email}, - { :id => 3, :name => Faker::Internet.user_name, :email => Faker::Internet.email}, - { :id => 4, :name => Faker::Internet.user_name, :email => Faker::Internet.email}, - { :id => 5, :name => Faker::Internet.user_name, :email => Faker::Internet.email}, - { :id => 6, :name => Faker::Internet.user_name, :email => Faker::Internet.email}, - { :id => 7, :name => Faker::Internet.user_name, :email => Faker::Internet.email}, - { :id => 8, :name => Faker::Internet.user_name, :email => Faker::Internet.email}, - { :id => 9, :name => Faker::Internet.user_name, :email => Faker::Internet.email} + { id: 2, username: Faker::Internet.user_name, name: Faker::Name.name, email: Faker::Internet.email}, + { id: 3, username: Faker::Internet.user_name, name: Faker::Name.name, email: Faker::Internet.email}, + { id: 4, username: Faker::Internet.user_name, name: Faker::Name.name, email: Faker::Internet.email}, + { id: 5, username: Faker::Internet.user_name, name: Faker::Name.name, email: Faker::Internet.email}, + { id: 6, username: Faker::Internet.user_name, name: Faker::Name.name, email: Faker::Internet.email}, + { id: 7, username: Faker::Internet.user_name, name: Faker::Name.name, email: Faker::Internet.email}, + { id: 8, username: Faker::Internet.user_name, name: Faker::Name.name, email: Faker::Internet.email}, + { id: 9, username: Faker::Internet.user_name, name: Faker::Name.name, email: Faker::Internet.email} ]) diff --git a/db/fixtures/production/001_admin.rb b/db/fixtures/production/001_admin.rb index cfff6bf8bc2..f119694d11d 100644 --- a/db/fixtures/production/001_admin.rb +++ b/db/fixtures/production/001_admin.rb @@ -1,8 +1,9 @@ admin = User.create( - :email => "admin@local.host", - :name => "Administrator", - :password => "5iveL!fe", - :password_confirmation => "5iveL!fe" + email: "admin@local.host", + name: "Administrator", + username: 'root', + password: "5iveL!fe", + password_confirmation: "5iveL!fe" ) admin.projects_limit = 10000 diff --git a/db/migrate/20121123164910_rename_code_to_path.rb b/db/migrate/20121123164910_rename_code_to_path.rb new file mode 100644 index 00000000000..fb10baf58cf --- /dev/null +++ b/db/migrate/20121123164910_rename_code_to_path.rb @@ -0,0 +1,11 @@ +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/schema.rb b/db/schema.rb index 8ce3df0d65a..32dafed2b63 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20121123104937) do +ActiveRecord::Schema.define(:version => 20121123164910) do create_table "events", :force => true do |t| t.string "target_type" @@ -82,7 +82,7 @@ ActiveRecord::Schema.define(:version => 20121123104937) do create_table "namespaces", :force => true do |t| t.string "name", :null => false - t.string "code", :null => false + t.string "path", :null => false t.integer "owner_id", :null => false t.datetime "created_at", :null => false t.datetime "updated_at", :null => false @@ -111,7 +111,6 @@ ActiveRecord::Schema.define(:version => 20121123104937) do t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.boolean "private_flag", :default => true, :null => false - t.string "code" t.integer "owner_id" t.string "default_branch" t.boolean "issues_enabled", :default => true, :null => false |