Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
0b4f4fe1
Commit
0b4f4fe1
authored
Feb 18, 2013
by
Andrew8xx8
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrations for StateMachine refactoring added
parent
1644117a
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
69 additions
and
19 deletions
+69
-19
db/migrate/20130214153504_rename_closed_to_state_in_issue.rb
db/migrate/20130214153504_rename_closed_to_state_in_issue.rb
+5
-0
db/migrate/20130214153809_change_state_type_in_issue.rb
db/migrate/20130214153809_change_state_type_in_issue.rb
+9
-0
db/migrate/20130214154847_rename_closed_to_state_in_merge_request.rb
...20130214154847_rename_closed_to_state_in_merge_request.rb
+5
-0
db/migrate/20130214155334_change_state_type_in_merge_request.rb
...rate/20130214155334_change_state_type_in_merge_request.rb
+9
-0
db/migrate/20130214155542_rename_closed_to_state_in_milestone.rb
...ate/20130214155542_rename_closed_to_state_in_milestone.rb
+5
-0
db/migrate/20130214155632_change_state_type_in_milestone.rb
db/migrate/20130214155632_change_state_type_in_milestone.rb
+9
-0
db/migrate/20130218091244_remove_merged_from_merge_request.rb
...igrate/20130218091244_remove_merged_from_merge_request.rb
+9
-0
db/schema.rb
db/schema.rb
+18
-19
No files found.
db/migrate/20130214153504_rename_closed_to_state_in_issue.rb
0 → 100644
View file @
0b4f4fe1
class
RenameClosedToStateInIssue
<
ActiveRecord
::
Migration
def
change
rename_column
:issues
,
:closed
,
:state
end
end
db/migrate/20130214153809_change_state_type_in_issue.rb
0 → 100644
View file @
0b4f4fe1
class
ChangeStateTypeInIssue
<
ActiveRecord
::
Migration
def
up
change_column
:issues
,
:state
,
:string
end
def
down
change_column
:issues
,
:state
,
:boolean
end
end
db/migrate/20130214154847_rename_closed_to_state_in_merge_request.rb
0 → 100644
View file @
0b4f4fe1
class
RenameClosedToStateInMergeRequest
<
ActiveRecord
::
Migration
def
change
rename_column
:merge_requests
,
:closed
,
:state
end
end
db/migrate/20130214155334_change_state_type_in_merge_request.rb
0 → 100644
View file @
0b4f4fe1
class
ChangeStateTypeInMergeRequest
<
ActiveRecord
::
Migration
def
up
change_column
:merge_requests
,
:state
,
:string
end
def
down
change_column
:merge_requests
,
:state
,
:boolean
end
end
db/migrate/20130214155542_rename_closed_to_state_in_milestone.rb
0 → 100644
View file @
0b4f4fe1
class
RenameClosedToStateInMilestone
<
ActiveRecord
::
Migration
def
change
rename_column
:milestones
,
:closed
,
:state
end
end
db/migrate/20130214155632_change_state_type_in_milestone.rb
0 → 100644
View file @
0b4f4fe1
class
ChangeStateTypeInMilestone
<
ActiveRecord
::
Migration
def
up
change_column
:milestones
,
:state
,
:string
end
def
down
change_column
:milestones
,
:state
,
:boolean
end
end
db/migrate/20130218091244_remove_merged_from_merge_request.rb
0 → 100644
View file @
0b4f4fe1
class
RemoveMergedFromMergeRequest
<
ActiveRecord
::
Migration
def
up
remove_column
:merge_requests
,
:merged
end
def
down
add_column
:merge_requests
,
:merged
,
:boolean
,
default:
true
,
null:
false
end
end
db/schema.rb
View file @
0b4f4fe1
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
:version
=>
20130
131070232
)
do
ActiveRecord
::
Schema
.
define
(
:version
=>
20130
218091244
)
do
create_table
"events"
,
:force
=>
true
do
|
t
|
t
.
string
"target_type"
...
...
@@ -39,7 +39,7 @@ ActiveRecord::Schema.define(:version => 20130131070232) do
t
.
integer
"project_id"
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
boolean
"closed"
,
:default
=>
false
,
:null
=>
false
t
.
string
"state"
,
:default
=>
"0"
,
:null
=>
false
t
.
integer
"position"
,
:default
=>
0
t
.
string
"branch_name"
t
.
text
"description"
...
...
@@ -48,10 +48,10 @@ ActiveRecord::Schema.define(:version => 20130131070232) do
add_index
"issues"
,
[
"assignee_id"
],
:name
=>
"index_issues_on_assignee_id"
add_index
"issues"
,
[
"author_id"
],
:name
=>
"index_issues_on_author_id"
add_index
"issues"
,
[
"closed"
],
:name
=>
"index_issues_on_closed"
add_index
"issues"
,
[
"created_at"
],
:name
=>
"index_issues_on_created_at"
add_index
"issues"
,
[
"milestone_id"
],
:name
=>
"index_issues_on_milestone_id"
add_index
"issues"
,
[
"project_id"
],
:name
=>
"index_issues_on_project_id"
add_index
"issues"
,
[
"state"
],
:name
=>
"index_issues_on_closed"
add_index
"issues"
,
[
"title"
],
:name
=>
"index_issues_on_title"
create_table
"keys"
,
:force
=>
true
do
|
t
|
...
...
@@ -75,23 +75,22 @@ ActiveRecord::Schema.define(:version => 20130131070232) do
t
.
integer
"author_id"
t
.
integer
"assignee_id"
t
.
string
"title"
t
.
boolean
"closed"
,
:default
=>
false
,
:null
=>
false
t
.
string
"state"
,
:default
=>
"0"
,
:null
=>
false
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
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
"merge_status"
,
:default
=>
1
,
:null
=>
false
t
.
integer
"milestone_id"
end
add_index
"merge_requests"
,
[
"assignee_id"
],
:name
=>
"index_merge_requests_on_assignee_id"
add_index
"merge_requests"
,
[
"author_id"
],
:name
=>
"index_merge_requests_on_author_id"
add_index
"merge_requests"
,
[
"closed"
],
:name
=>
"index_merge_requests_on_closed"
add_index
"merge_requests"
,
[
"created_at"
],
:name
=>
"index_merge_requests_on_created_at"
add_index
"merge_requests"
,
[
"milestone_id"
],
:name
=>
"index_merge_requests_on_milestone_id"
add_index
"merge_requests"
,
[
"project_id"
],
:name
=>
"index_merge_requests_on_project_id"
add_index
"merge_requests"
,
[
"source_branch"
],
:name
=>
"index_merge_requests_on_source_branch"
add_index
"merge_requests"
,
[
"state"
],
:name
=>
"index_merge_requests_on_closed"
add_index
"merge_requests"
,
[
"target_branch"
],
:name
=>
"index_merge_requests_on_target_branch"
add_index
"merge_requests"
,
[
"title"
],
:name
=>
"index_merge_requests_on_title"
...
...
@@ -100,7 +99,7 @@ ActiveRecord::Schema.define(:version => 20130131070232) do
t
.
integer
"project_id"
,
:null
=>
false
t
.
text
"description"
t
.
date
"due_date"
t
.
boolean
"closed"
,
:default
=>
false
,
:null
=>
false
t
.
string
"state"
,
:default
=>
"0"
,
:null
=>
false
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
end
...
...
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