Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
14c4a33c
Commit
14c4a33c
authored
7 years ago
by
Akihiko Odaki
Committed by
Eugen Rochko
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Change account_id non-nullable in lists (#5979)
parent
30d2ea03
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/models/list.rb
+1
-1
1 addition, 1 deletion
app/models/list.rb
db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb
+7
-0
7 additions, 0 deletions
.../20171201000000_change_account_id_nonnullable_in_lists.rb
db/schema.rb
+2
-2
2 additions, 2 deletions
db/schema.rb
with
10 additions
and
3 deletions
app/models/list.rb
+
1
−
1
View file @
14c4a33c
...
...
@@ -4,7 +4,7 @@
# Table name: lists
#
# id :integer not null, primary key
# account_id :integer
# account_id :integer
not null
# title :string default(""), not null
# created_at :datetime not null
# updated_at :datetime not null
...
...
This diff is collapsed.
Click to expand it.
db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb
0 → 100644
+
7
−
0
View file @
14c4a33c
require
Rails
.
root
.
join
(
'lib'
,
'mastodon'
,
'migration_helpers'
)
class
ChangeAccountIdNonnullableInLists
<
ActiveRecord
::
Migration
[
5.1
]
def
change
change_column_null
:lists
,
:account_id
,
false
end
end
This diff is collapsed.
Click to expand it.
db/schema.rb
+
2
−
2
View file @
14c4a33c
...
...
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
20171
130
000000
)
do
ActiveRecord
::
Schema
.
define
(
version:
20171
201
000000
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -209,7 +209,7 @@ ActiveRecord::Schema.define(version: 20171130000000) do
end
create_table
"lists"
,
force: :cascade
do
|
t
|
t
.
bigint
"account_id"
t
.
bigint
"account_id"
,
null:
false
t
.
string
"title"
,
default:
""
,
null:
false
t
.
datetime
"created_at"
,
null:
false
t
.
datetime
"updated_at"
,
null:
false
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment