Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
4b5a5fd0859c
Commit
10aa84bd
authored
Feb 05, 2014
by
Dmitriy Zaporozhets
Browse files
Merge branch 'squashed-migrations' into 'master'
Squashed migrations for 2011 and 2012
parents
83706fdc789e
02ed48a6c978
Changes
92
Hide whitespace changes
Inline
Side-by-side
db/migrate/20110913200833_devise_create_users.rb
deleted
100644 → 0
View file @
83706fdc
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
db/migrate/20110913204141_create_projects.rb
deleted
100644 → 0
View file @
83706fdc
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
db/migrate/20110914221600_create_users_projects.rb
deleted
100644 → 0
View file @
83706fdc
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
db/migrate/20110915205627_add_private_flag_to_project.rb
deleted
100644 → 0
View file @
83706fdc
class
AddPrivateFlagToProject
<
ActiveRecord
::
Migration
def
change
add_column
:projects
,
:private_flag
,
:boolean
,
:default
=>
true
,
:null
=>
false
end
end
db/migrate/20110915213352_create_keys.rb
deleted
100644 → 0
View file @
83706fdc
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
db/migrate/20110916123731_add_name_to_user.rb
deleted
100644 → 0
View file @
83706fdc
class
AddNameToUser
<
ActiveRecord
::
Migration
def
change
add_column
:users
,
:name
,
:string
end
end
db/migrate/20110916162511_add_key_title_to_key.rb
deleted
100644 → 0
View file @
83706fdc
class
AddKeyTitleToKey
<
ActiveRecord
::
Migration
def
change
add_column
:keys
,
:key
,
:text
add_column
:keys
,
:title
,
:string
remove_column
:keys
,
:project_id
end
end
db/migrate/20110917212932_add_identifier_to_key.rb
deleted
100644 → 0
View file @
83706fdc
class
AddIdentifierToKey
<
ActiveRecord
::
Migration
def
change
add_column
:keys
,
:identifier
,
:string
end
end
db/migrate/20110921192501_create_issues.rb
deleted
100644 → 0
View file @
83706fdc
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
db/migrate/20110922110156_add_code_to_project.rb
deleted
100644 → 0
View file @
83706fdc
class
AddCodeToProject
<
ActiveRecord
::
Migration
def
change
add_column
:projects
,
:code
,
:string
end
end
db/migrate/20110923211333_add_status_to_issue.rb
deleted
100644 → 0
View file @
83706fdc
class
AddStatusToIssue
<
ActiveRecord
::
Migration
def
change
add_column
:issues
,
:closed
,
:boolean
,
:default
=>
false
,
:null
=>
false
end
end
db/migrate/20110924214549_create_rails_admin_histories_table.rb
deleted
100644 → 0
View file @
83706fdc
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
db/migrate/20110924215658_add_admin_field_to_user.rb
deleted
100644 → 0
View file @
83706fdc
class
AddAdminFieldToUser
<
ActiveRecord
::
Migration
def
change
add_column
:users
,
:admin
,
:boolean
,
:default
=>
false
,
:null
=>
false
end
end
db/migrate/20110926082616_remove_admin.rb
deleted
100644 → 0
View file @
83706fdc
class
RemoveAdmin
<
ActiveRecord
::
Migration
def
up
drop_table
:rails_admin_histories
end
def
down
raise
"No rollback"
end
end
db/migrate/20110927130352_create_notes.rb
deleted
100644 → 0
View file @
83706fdc
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
db/migrate/20110928140106_add_project_id_for_note.rb
deleted
100644 → 0
View file @
83706fdc
class
AddProjectIdForNote
<
ActiveRecord
::
Migration
def
up
add_column
:notes
,
:project_id
,
:integer
end
def
down
remove_column
:notes
,
:project_id
,
:integer
end
end
db/migrate/20110928142747_change_noteable_id_for_note.rb
deleted
100644 → 0
View file @
83706fdc
class
ChangeNoteableIdForNote
<
ActiveRecord
::
Migration
def
up
change_column
:notes
,
:noteable_id
,
:string
end
def
down
change_column
:notes
,
:noteable_id
,
:integer
end
end
db/migrate/20110928161328_add_attachment_to_note.rb
deleted
100644 → 0
View file @
83706fdc
class
AddAttachmentToNote
<
ActiveRecord
::
Migration
def
change
add_column
:notes
,
:attachment
,
:string
end
end
db/migrate/20111005193700_add_allow_repo_creation_for_user.rb
deleted
100644 → 0
View file @
83706fdc
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
db/migrate/20111009101738_add_ownerto_project.rb
deleted
100644 → 0
View file @
83706fdc
class
AddOwnertoProject
<
ActiveRecord
::
Migration
def
change
add_column
:projects
,
:owner_id
,
:integer
end
end
Prev
1
2
3
4
5
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment