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
Jérome Perrin
gitlab-ce
Commits
b3dc4fb7
Commit
b3dc4fb7
authored
Mar 25, 2013
by
Andrew8xx8
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrations to convert data added
parent
3b6228dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
db/migrate/20130323174317_add_private_to_snippets.rb
db/migrate/20130323174317_add_private_to_snippets.rb
+1
-1
db/migrate/20130324203535_add_type_value_for_snippets.rb
db/migrate/20130324203535_add_type_value_for_snippets.rb
+8
-0
db/schema.rb
db/schema.rb
+5
-5
No files found.
db/migrate/20130323174317_add_private_to_snippets.rb
View file @
b3dc4fb7
class
AddPrivateToSnippets
<
ActiveRecord
::
Migration
def
change
add_column
:snippets
,
:private
,
:boolean
add_column
:snippets
,
:private
,
:boolean
,
null:
false
,
default:
true
end
end
db/migrate/20130324203535_add_type_value_for_snippets.rb
0 → 100644
View file @
b3dc4fb7
class
AddTypeValueForSnippets
<
ActiveRecord
::
Migration
def
up
Snippet
.
where
(
"project_id IS NOT NULL"
).
update_all
(
type:
'ProjectSnippet'
)
end
def
down
end
end
db/schema.rb
View file @
b3dc4fb7
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
:version
=>
20130324
172327
)
do
ActiveRecord
::
Schema
.
define
(
:version
=>
20130324
203535
)
do
create_table
"events"
,
:force
=>
true
do
|
t
|
t
.
string
"target_type"
...
...
@@ -184,13 +184,13 @@ ActiveRecord::Schema.define(:version => 20130324172327) do
create_table
"snippets"
,
:force
=>
true
do
|
t
|
t
.
string
"title"
t
.
text
"content"
t
.
integer
"author_id"
,
:null
=>
false
t
.
integer
"author_id"
,
:null
=>
false
t
.
integer
"project_id"
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
string
"file_name"
t
.
datetime
"expires_at"
t
.
boolean
"private"
t
.
boolean
"private"
,
:default
=>
true
,
:null
=>
false
t
.
string
"type"
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