Deprecate code for Project. Use title and path
This commit is contained in:
parent
ab9d023651
commit
c50ec72b52
22 changed files with 79 additions and 83 deletions
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
])
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
11
db/migrate/20121123164910_rename_code_to_path.rb
Normal file
11
db/migrate/20121123164910_rename_code_to_path.rb
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue