Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spring-boot-bdd
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
repos.quentin.fasler
projet semestre
spring-boot-bdd
Commits
6e7fdbbf
Commit
6e7fdbbf
authored
1 year ago
by
quentin.fasler
Browse files
Options
Downloads
Patches
Plain Diff
add data migration
parent
a8938d94
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
src/main/resources/db/migration/V2_1__Initial_data.sql
+45
-0
45 additions, 0 deletions
src/main/resources/db/migration/V2_1__Initial_data.sql
with
45 additions
and
0 deletions
src/main/resources/db/migration/V2_1__Initial_data.sql
+
45
−
0
View file @
6e7fdbbf
INSERT
INTO
user
(
name
,
email
)
VALUES
(
'John Doe'
,
'john.doe@example.com'
),
(
'Jane Smith'
,
'jane.smith@example.com'
),
(
'Alice Johnson'
,
'alice.johnson@example.com'
),
(
'Bob Brown'
,
'bob.brown@example.com'
),
(
'Charlie Davis'
,
'charlie.davis@example.com'
);
INSERT
INTO
product
(
name
,
price
,
stock
)
VALUES
(
'Product 1'
,
10
.
00
,
100
),
(
'Product 2'
,
15
.
50
,
200
),
(
'Product 3'
,
8
.
25
,
150
),
(
'Product 4'
,
22
.
50
,
90
),
(
'Product 5'
,
45
.
00
,
50
),
(
'Product 6'
,
12
.
00
,
120
),
(
'Product 7'
,
17
.
75
,
80
),
(
'Product 8'
,
5
.
00
,
200
),
(
'Product 9'
,
250
.
00
,
25
),
(
'Product 10'
,
19
.
99
,
60
),
(
'Product 11'
,
29
.
95
,
70
),
(
'Product 12'
,
9
.
50
,
110
),
(
'Product 13'
,
14
.
75
,
100
),
(
'Product 14'
,
23
.
00
,
85
),
(
'Product 15'
,
11
.
25
,
95
),
(
'Product 16'
,
55
.
00
,
40
),
(
'Product 17'
,
20
.
20
,
60
),
(
'Product 18'
,
35
.
00
,
75
),
(
'Product 19'
,
7
.
00
,
180
),
(
'Product 20'
,
100
.
00
,
30
);
INSERT
INTO
purchase
(
user_id
,
product_id
,
quantity
)
VALUES
(
1
,
1
,
2
),
(
1
,
2
,
1
),
(
1
,
3
,
3
),
(
2
,
4
,
1
),
(
2
,
5
,
2
),
(
2
,
6
,
1
),
(
3
,
7
,
3
),
(
3
,
8
,
2
),
(
3
,
9
,
1
),
(
4
,
10
,
2
),
(
4
,
11
,
1
),
(
4
,
12
,
3
),
(
5
,
13
,
1
),
(
5
,
14
,
2
),
(
5
,
15
,
1
);
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