Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
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
PSDI Army
yii2
Commits
b987c921
Commit
b987c921
authored
Mar 30, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Escaped more table names
parent
538a074c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
postgres.sql
tests/unit/data/postgres.sql
+4
-4
sqlite.sql
tests/unit/data/sqlite.sql
+1
-1
No files found.
tests/unit/data/postgres.sql
View file @
b987c921
...
...
@@ -44,19 +44,19 @@ CREATE TABLE "category" (
CREATE
TABLE
"item"
(
id
serial
not
null
primary
key
,
name
varchar
(
128
)
NOT
NULL
,
category_id
integer
NOT
NULL
references
category
(
id
)
on
UPDATE
CASCADE
on
DELETE
CASCADE
category_id
integer
NOT
NULL
references
"category"
(
id
)
on
UPDATE
CASCADE
on
DELETE
CASCADE
);
CREATE
TABLE
"order"
(
id
serial
not
null
primary
key
,
customer_id
integer
NOT
NULL
references
customer
(
id
)
on
UPDATE
CASCADE
on
DELETE
CASCADE
,
customer_id
integer
NOT
NULL
references
"customer"
(
id
)
on
UPDATE
CASCADE
on
DELETE
CASCADE
,
created_at
integer
NOT
NULL
,
total
decimal
(
10
,
0
)
NOT
NULL
);
CREATE
TABLE
"order_item"
(
order_id
integer
NOT
NULL
references
order
(
id
)
on
UPDATE
CASCADE
on
DELETE
CASCADE
,
item_id
integer
NOT
NULL
references
item
(
id
)
on
UPDATE
CASCADE
on
DELETE
CASCADE
,
order_id
integer
NOT
NULL
references
"order"
(
id
)
on
UPDATE
CASCADE
on
DELETE
CASCADE
,
item_id
integer
NOT
NULL
references
"item"
(
id
)
on
UPDATE
CASCADE
on
DELETE
CASCADE
,
quantity
integer
NOT
NULL
,
subtotal
decimal
(
10
,
0
)
NOT
NULL
,
PRIMARY
KEY
(
order_id
,
item_id
)
...
...
tests/unit/data/sqlite.sql
View file @
b987c921
...
...
@@ -63,7 +63,7 @@ CREATE TABLE "composite_fk" (
order_id
int
(
11
)
NOT
NULL
,
item_id
int
(
11
)
NOT
NULL
,
PRIMARY
KEY
(
id
),
CONSTRAINT
FK_composite_fk_order_item
FOREIGN
KEY
(
order_id
,
item_id
)
REFERENCES
order_item
(
order_id
,
item_id
)
ON
DELETE
CASCADE
CONSTRAINT
FK_composite_fk_order_item
FOREIGN
KEY
(
order_id
,
item_id
)
REFERENCES
"order_item"
(
order_id
,
item_id
)
ON
DELETE
CASCADE
);
CREATE
TABLE
"null_values"
(
...
...
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