Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shotengai
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
shotengai
Commits
6a67da18
Commit
6a67da18
authored
7 years ago
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update migration
parent
d9b312c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
1_create_shotengai_products_and_orders.rb
db/migrate/1_create_shotengai_products_and_orders.rb
+10
-8
No files found.
db/migrate/1_create_shotengai_products_and_orders.rb
View file @
6a67da18
...
...
@@ -10,7 +10,6 @@ class CreateShotengaiProductsAndOrders < ActiveRecord::Migration[5.1]
create_table
:shotengai_products
do
|
t
|
t
.
string
:title
t
.
string
:status
t
.
json
:spec
t
.
integer
:default_series_id
t
.
boolean
:need_express
t
.
boolean
:need_time_attr
...
...
@@ -20,7 +19,10 @@ class CreateShotengaiProductsAndOrders < ActiveRecord::Migration[5.1]
# Single Table Inheritance
t
.
string
:type
t
.
json
:meta
t
.
json
:remark
t
.
json
:spec_template
t
.
json
:remark_template
t
.
json
:info_template
t
.
references
:manager
,
polymorphic:
true
,
index:
true
t
.
timestamps
...
...
@@ -34,12 +36,12 @@ class CreateShotengaiProductsAndOrders < ActiveRecord::Migration[5.1]
t
.
decimal
:price
,
precision:
9
,
scale:
2
t
.
integer
:stock
,
default:
-
1
t
.
string
:aasm_state
t
.
json
:spec
# Single Table Inheritance
t
.
string
:type
t
.
json
:meta
t
.
json
:remark
t
.
json
:info
t
.
json
:spec_value
t
.
json
:remark_value
t
.
json
:info_value
t
.
references
:shotengai_product
,
foreign_key:
true
t
.
timestamps
...
...
@@ -81,15 +83,15 @@ class CreateShotengaiProductsAndOrders < ActiveRecord::Migration[5.1]
t
.
decimal
:revised_amount
,
precision:
9
,
scale:
2
t
.
integer
:count
t
.
json
:spec
t
.
json
:banners
t
.
string
:cover_image
t
.
json
:detail
# Single Table Inheritance
t
.
string
:type
t
.
json
:meta
t
.
json
:remark
t
.
json
:info
t
.
json
:spec_value
t
.
json
:remark_value
t
.
json
:info_value
t
.
references
:shotengai_series
,
foreign_key:
true
t
.
references
:shotengai_order
,
foreign_key:
true
...
...
This diff is collapsed.
Click to expand it.
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