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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
a735ce2a
Commit
a735ce2a
authored
May 06, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migrations for ssh key STI and deploy keys <-> projects relation
parent
543d86f3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
33 deletions
+60
-33
db/migrate/20130506085413_add_type_to_key.rb
db/migrate/20130506085413_add_type_to_key.rb
+5
-0
db/migrate/20130506090604_create_deploy_keys_projects.rb
db/migrate/20130506090604_create_deploy_keys_projects.rb
+10
-0
db/schema.rb
db/schema.rb
+45
-33
No files found.
db/migrate/20130506085413_add_type_to_key.rb
0 → 100644
View file @
a735ce2a
class
AddTypeToKey
<
ActiveRecord
::
Migration
def
change
add_column
:keys
,
:type
,
:string
end
end
db/migrate/20130506090604_create_deploy_keys_projects.rb
0 → 100644
View file @
a735ce2a
class
CreateDeployKeysProjects
<
ActiveRecord
::
Migration
def
change
create_table
:deploy_keys_projects
do
|
t
|
t
.
integer
:deploy_key_id
,
null:
false
t
.
integer
:project_id
,
null:
false
t
.
timestamps
end
end
end
db/schema.rb
View file @
a735ce2a
...
...
@@ -11,7 +11,14 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
:version
=>
20130410175022
)
do
ActiveRecord
::
Schema
.
define
(
:version
=>
20130506090604
)
do
create_table
"deploy_keys_projects"
,
:force
=>
true
do
|
t
|
t
.
integer
"deploy_key_id"
,
:null
=>
false
t
.
integer
"project_id"
,
:null
=>
false
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
end
create_table
"events"
,
:force
=>
true
do
|
t
|
t
.
string
"target_type"
...
...
@@ -46,8 +53,8 @@ ActiveRecord::Schema.define(:version => 20130410175022) do
t
.
integer
"assignee_id"
t
.
integer
"author_id"
t
.
integer
"project_id"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
integer
"position"
,
:default
=>
0
t
.
string
"branch_name"
t
.
text
"description"
...
...
@@ -64,12 +71,13 @@ ActiveRecord::Schema.define(:version => 20130410175022) do
create_table
"keys"
,
:force
=>
true
do
|
t
|
t
.
integer
"user_id"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
text
"key"
t
.
string
"title"
t
.
string
"identifier"
t
.
integer
"project_id"
t
.
string
"type"
end
add_index
"keys"
,
[
"identifier"
],
:name
=>
"index_keys_on_identifier"
...
...
@@ -83,8 +91,8 @@ ActiveRecord::Schema.define(:version => 20130410175022) do
t
.
integer
"author_id"
t
.
integer
"assignee_id"
t
.
string
"title"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
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
.
integer
"milestone_id"
...
...
@@ -133,8 +141,8 @@ ActiveRecord::Schema.define(:version => 20130410175022) do
t
.
text
"note"
t
.
string
"noteable_type"
t
.
integer
"author_id"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
integer
"project_id"
t
.
string
"attachment"
t
.
string
"line_code"
...
...
@@ -152,8 +160,8 @@ ActiveRecord::Schema.define(:version => 20130410175022) do
t
.
string
"name"
t
.
string
"path"
t
.
text
"description"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
integer
"creator_id"
t
.
string
"default_branch"
t
.
boolean
"issues_enabled"
,
:default
=>
true
,
:null
=>
false
...
...
@@ -197,8 +205,8 @@ ActiveRecord::Schema.define(:version => 20130410175022) do
t
.
text
"content"
t
.
integer
"author_id"
,
:null
=>
false
t
.
integer
"project_id"
,
:null
=>
false
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
string
"file_name"
t
.
datetime
"expires_at"
end
...
...
@@ -217,6 +225,9 @@ ActiveRecord::Schema.define(:version => 20130410175022) do
t
.
datetime
"created_at"
end
add_index
"taggings"
,
[
"tag_id"
],
:name
=>
"index_taggings_on_tag_id"
add_index
"taggings"
,
[
"taggable_id"
,
"taggable_type"
,
"context"
],
:name
=>
"index_taggings_on_taggable_id_and_taggable_type_and_context"
create_table
"tags"
,
:force
=>
true
do
|
t
|
t
.
string
"name"
end
...
...
@@ -249,7 +260,7 @@ ActiveRecord::Schema.define(:version => 20130410175022) do
create_table
"users"
,
:force
=>
true
do
|
t
|
t
.
string
"email"
,
:default
=>
""
,
:null
=>
false
t
.
string
"encrypted_password"
,
:
limit
=>
128
,
:
default
=>
""
,
:null
=>
false
t
.
string
"encrypted_password"
,
:default
=>
""
,
:null
=>
false
t
.
string
"reset_password_token"
t
.
datetime
"reset_password_sent_at"
t
.
datetime
"remember_created_at"
...
...
@@ -258,8 +269,8 @@ ActiveRecord::Schema.define(:version => 20130410175022) do
t
.
datetime
"last_sign_in_at"
t
.
string
"current_sign_in_ip"
t
.
string
"last_sign_in_ip"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
string
"name"
t
.
boolean
"admin"
,
:default
=>
false
,
:null
=>
false
t
.
integer
"projects_limit"
,
:default
=>
10
...
...
@@ -283,6 +294,7 @@ ActiveRecord::Schema.define(:version => 20130410175022) do
add_index
"users"
,
[
"admin"
],
:name
=>
"index_users_on_admin"
add_index
"users"
,
[
"email"
],
:name
=>
"index_users_on_email"
,
:unique
=>
true
add_index
"users"
,
[
"extern_uid"
,
"provider"
],
:name
=>
"index_users_on_extern_uid_and_provider"
,
:unique
=>
true
add_index
"users"
,
[
"name"
],
:name
=>
"index_users_on_name"
add_index
"users"
,
[
"reset_password_token"
],
:name
=>
"index_users_on_reset_password_token"
,
:unique
=>
true
add_index
"users"
,
[
"username"
],
:name
=>
"index_users_on_username"
...
...
@@ -290,8 +302,8 @@ ActiveRecord::Schema.define(:version => 20130410175022) do
create_table
"users_projects"
,
:force
=>
true
do
|
t
|
t
.
integer
"user_id"
,
:null
=>
false
t
.
integer
"project_id"
,
:null
=>
false
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
integer
"project_access"
,
:default
=>
0
,
:null
=>
false
t
.
integer
"notification_level"
,
:default
=>
3
,
:null
=>
false
end
...
...
@@ -303,8 +315,8 @@ ActiveRecord::Schema.define(:version => 20130410175022) do
create_table
"web_hooks"
,
:force
=>
true
do
|
t
|
t
.
string
"url"
t
.
integer
"project_id"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
string
"type"
,
:default
=>
"ProjectHook"
t
.
integer
"service_id"
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