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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
58d69d54
Commit
58d69d54
authored
Jun 09, 2018
by
Jan Provaznik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing `:comment` attribute
In Rails 5 IndexDefinition contains also `:comment` attribute.
parent
f646a8b9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
config/initializers/postgresql_opclasses_support.rb
config/initializers/postgresql_opclasses_support.rb
+6
-1
No files found.
config/initializers/postgresql_opclasses_support.rb
View file @
58d69d54
...
...
@@ -41,7 +41,12 @@ module ActiveRecord
# Abstract representation of an index definition on a table. Instances of
# this type are typically created and returned by methods in database
# adapters. e.g. ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter#indexes
class
IndexDefinition
<
Struct
.
new
(
:table
,
:name
,
:unique
,
:columns
,
:lengths
,
:orders
,
:where
,
:type
,
:using
,
:opclasses
)
#:nodoc:
attrs
=
[
:table
,
:name
,
:unique
,
:columns
,
:lengths
,
:orders
,
:where
,
:type
,
:using
,
:opclasses
]
# In Rails 5 the second last attribute is newly `:comment`
attrs
.
insert
(
-
2
,
:comment
)
if
Gitlab
.
rails5?
class
IndexDefinition
<
Struct
.
new
(
*
attrs
)
#:nodoc:
end
end
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