Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
2019_TP2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nicolas.paschoud
2019_TP2
Commits
00a7d3fa
Commit
00a7d3fa
authored
5 years ago
by
nicolas.paschoud
Browse files
Options
Downloads
Patches
Plain Diff
Name modifying for tables
parent
4fcc4532
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
projet/hyperdrive.sql
+5
-5
5 additions, 5 deletions
projet/hyperdrive.sql
with
5 additions
and
5 deletions
projet/hyperdrive.sql
+
5
−
5
View file @
00a7d3fa
CREATE
DATABASE
IF
NOT
EXISTS
`hyperdrive`
DEFAULT
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
;
CREATE
DATABASE
IF
NOT
EXISTS
`hyperdrive`
DEFAULT
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
;
USE
`hyperdrive`
;
USE
`hyperdrive`
;
CREATE
TABLE
IF
NOT
EXISTS
User
(
CREATE
TABLE
IF
NOT
EXISTS
User
s
(
pseudo
varchar
(
60
)
NOT
NULL
,
pseudo
varchar
(
60
)
NOT
NULL
,
passwd
varchar
(
256
)
NOT
NULL
,
passwd
varchar
(
256
)
NOT
NULL
,
PRIMARY
KEY
(
pseudo
)
PRIMARY
KEY
(
pseudo
)
...
@@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS Paths (
...
@@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS Paths (
pseudo
varchar
(
60
)
NOT
NULL
,
pseudo
varchar
(
60
)
NOT
NULL
,
parent
varchar
(
50
),
parent
varchar
(
50
),
PRIMARY
KEY
(
paths
),
PRIMARY
KEY
(
paths
),
FOREIGN
KEY
(
pseudo
)
REFERENCES
User
(
pseudo
),
FOREIGN
KEY
(
pseudo
)
REFERENCES
User
s
(
pseudo
),
FOREIGN
KEY
(
parent
)
REFERENCES
Paths
(
paths
)
FOREIGN
KEY
(
parent
)
REFERENCES
Paths
(
paths
)
);
);
...
@@ -24,12 +24,12 @@ CREATE TABLE IF NOT EXISTS Files (
...
@@ -24,12 +24,12 @@ CREATE TABLE IF NOT EXISTS Files (
FOREIGN
KEY
(
paths
)
REFERENCES
Paths
(
paths
)
FOREIGN
KEY
(
paths
)
REFERENCES
Paths
(
paths
)
);
);
CREATE
TABLE
IF
NOT
EXISTS
Share
(
CREATE
TABLE
IF
NOT
EXISTS
Share
s
(
pseudo_1
varchar
(
60
)
NOT
NULL
,
pseudo_1
varchar
(
60
)
NOT
NULL
,
pseudo_2
varchar
(
60
)
NOT
NULL
,
pseudo_2
varchar
(
60
)
NOT
NULL
,
file_id
varchar
(
100
)
NOT
NULL
,
file_id
varchar
(
100
)
NOT
NULL
,
PRIMARY
KEY
(
pseudo_1
,
pseudo_2
,
file_id
),
PRIMARY
KEY
(
pseudo_1
,
pseudo_2
,
file_id
),
FOREIGN
KEY
(
pseudo_1
)
REFERENCES
User
(
pseudo
),
FOREIGN
KEY
(
pseudo_1
)
REFERENCES
User
s
(
pseudo
),
FOREIGN
KEY
(
pseudo_2
)
REFERENCES
User
(
pseudo
),
FOREIGN
KEY
(
pseudo_2
)
REFERENCES
User
s
(
pseudo
),
FOREIGN
KEY
(
file_id
)
REFERENCES
Files
(
file_id
)
FOREIGN
KEY
(
file_id
)
REFERENCES
Files
(
file_id
)
);
);
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment