Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DAAExample
Project
Project
Details
Activity
Releases
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
Santiago Gómez Vilar
DAAExample
Commits
e836f6a3
Commit
e836f6a3
authored
Feb 28, 2019
by
Santi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified database to save pets data
parent
6bbdf414
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
mysql-with-inserts.sql
db/mysql-with-inserts.sql
+12
-0
mysql.sql
db/mysql.sql
+10
-0
No files found.
db/mysql-with-inserts.sql
View file @
e836f6a3
...
...
@@ -14,6 +14,18 @@ CREATE TABLE `daaexample`.`users` (
PRIMARY
KEY
(
`login`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
CREATE
TABLE
`daaexample`
.
`pet`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`owner`
VARCHAR
(
50
)
NOT
NULL
,
`name`
int
(
11
)
NOT
NULL
,
PRIMARY
KEY
(
`id`
),
KEY
`FK_pet_person`
(
`owner`
),
CONSTRAINT
`FK_pet_person`
FOREIGN
KEY
(
`owner`
)
REFERENCES
`people`
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
latin1
;
GRANT
ALL
ON
`daaexample`
.
*
TO
'daa'
@
'localhost'
IDENTIFIED
BY
'daa'
;
INSERT
INTO
`daaexample`
.
`people`
(
`id`
,
`name`
,
`surname`
)
VALUES
(
0
,
'Antón'
,
'Pérez'
);
...
...
db/mysql.sql
View file @
e836f6a3
...
...
@@ -14,4 +14,14 @@ CREATE TABLE `daaexample`.`users` (
PRIMARY
KEY
(
`login`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
CREATE
TABLE
`daaexample`
.
`pet`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`owner`
int
(
11
)
NOT
NULL
,
`name`
VARCHAR
(
50
)
NOT
NULL
,
PRIMARY
KEY
(
`id`
),
KEY
`FK_pet_person`
(
`owner`
),
CONSTRAINT
`FK_pet_person`
FOREIGN
KEY
(
`owner`
)
REFERENCES
`people`
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
latin1
;
GRANT
ALL
ON
`daaexample`
.
*
TO
'daa'
@
'localhost'
IDENTIFIED
BY
'daa'
;
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