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
09d3d351
Commit
09d3d351
authored
Feb 11, 2015
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove not null constraint on project_id in services.
parent
55153660
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
app/models/service.rb
app/models/service.rb
+2
-2
db/migrate/20150211174341_allow_null_in_services_project_id.rb
...grate/20150211174341_allow_null_in_services_project_id.rb
+5
-0
db/schema.rb
db/schema.rb
+2
-2
No files found.
app/models/service.rb
View file @
09d3d351
...
...
@@ -5,12 +5,12 @@
# id :integer not null, primary key
# type :string(255)
# title :string(255)
# project_id :integer
not null
# project_id :integer
# created_at :datetime
# updated_at :datetime
# active :boolean default(FALSE), not null
# properties :text
# temp
alate
:boolean default(FALSE)
# temp
late
:boolean default(FALSE)
# To add new service you should build a class inherited from Service
# and implement a set of methods
...
...
db/migrate/20150211174341_allow_null_in_services_project_id.rb
0 → 100644
View file @
09d3d351
class
AllowNullInServicesProjectId
<
ActiveRecord
::
Migration
def
change
change_column
:services
,
:project_id
,
:integer
,
null:
true
end
end
db/schema.rb
View file @
09d3d351
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2015021117
2122
)
do
ActiveRecord
::
Schema
.
define
(
version:
2015021117
4341
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -360,7 +360,7 @@ ActiveRecord::Schema.define(version: 20150211172122) do
create_table
"services"
,
force:
true
do
|
t
|
t
.
string
"type"
t
.
string
"title"
t
.
integer
"project_id"
,
null:
false
t
.
integer
"project_id"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
boolean
"active"
,
default:
false
,
null:
false
...
...
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