Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
whaleback
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
whaleback
Commits
defb46ec
Commit
defb46ec
authored
Jul 16, 2018
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename migrations
parent
08cf6027
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
1_create_whaleback_media_objs_and_media_attachments.rb
...te/1_create_whaleback_media_objs_and_media_attachments.rb
+6
-6
No files found.
db/migrate/1_create_media_objs_and_media_attachments.rb
→
db/migrate/1_create_
whaleback_
media_objs_and_media_attachments.rb
View file @
defb46ec
class
CreateMediaObjsAndMediaAttachments
<
ActiveRecord
::
Migration
[
5.1
]
class
Create
Whaleback
MediaObjsAndMediaAttachments
<
ActiveRecord
::
Migration
[
5.1
]
def
change
create_table
:media_objs
do
|
t
|
create_table
:
whaleback_
media_objs
do
|
t
|
t
.
attachment
:file
t
.
string
:type
t
.
references
:creator
,
polymorphic:
true
t
.
references
:creator
,
polymorphic:
true
,
index:
{
name: :whaleback_poly_creator
}
t
.
timestamps
end
create_table
:media_attachments
do
|
t
|
create_table
:
whaleback_
media_attachments
do
|
t
|
t
.
string
:column_name
t
.
references
:attached
,
polymorphic:
true
t
.
references
:attached
,
polymorphic:
true
,
index:
{
name: :whaleback_poly_attached
}
t
.
references
:obj
t
.
timestamps
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