Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
235 commits
Select commit Hold shift + click to select a range
8b57615
replace with mine
adela-bytebase Nov 5, 2025
9454ddf
update
adela-bytebase Nov 5, 2025
e9596f7
fix
adela-bytebase Nov 5, 2025
b299699
remove not null
adela-bytebase Nov 5, 2025
4b11278
remove not null
adela-bytebase Nov 5, 2025
7f7ad24
fix
adela-bytebase Nov 5, 2025
bdc353a
fix
adela-bytebase Nov 5, 2025
0f4ad92
Merge pull request #25 from adela-bytebase/update-schema-emp-nickname
adela-bytebase Nov 5, 2025
ad75296
add new schem and table
adela-bytebase Nov 5, 2025
1aaa63c
Merge pull request #26 from adela-bytebase/create-testschema-testtable
adela-bytebase Nov 5, 2025
24d8285
fix
adela-bytebase Nov 5, 2025
16d7b3d
Merge pull request #27 from adela-bytebase/create-t0
adela-bytebase Nov 5, 2025
58caf06
Delete migrations-semver directory
adela-bytebase Nov 11, 2025
1b8f1e2
Delete schema directory
adela-bytebase Nov 11, 2025
c101611
Create 1.0.0_create_table_t0.sql
adela-bytebase Nov 11, 2025
142bfb6
Change 'name' column to 'username' in t0 table
adela-bytebase Nov 11, 2025
f48c500
Set username column to NOT NULL in t0 table
adela-bytebase Nov 11, 2025
3ceb5f5
Merge pull request #29 from adela-bytebase/adela-bytebase-patch-25
adela-bytebase Nov 11, 2025
9677c33
Create table 't1' with id and username columns
adela-bytebase Nov 11, 2025
cb9a8b0
Create initial database schema with tables and triggers
adela-bytebase Nov 19, 2025
fb3e9db
Merge pull request #31 from adela-bytebase/adela-bytebase-patch-27
adela-bytebase Nov 19, 2025
ab21b34
Delete 't0' table from schema.sql
adela-bytebase Nov 19, 2025
2635d63
Merge pull request #32 from adela-bytebase/adela-bytebase-patch-28
adela-bytebase Nov 19, 2025
938a67d
Delete schema directory
adela-bytebase Nov 19, 2025
1a581cc
Merge pull request #33 from adela-bytebase/adela-bytebase-patch-29
adela-bytebase Nov 19, 2025
2d44636
Create schema.sql
adela-bytebase Nov 19, 2025
6a8df3d
Merge pull request #34 from adela-bytebase/adela-bytebase-patch-30
adela-bytebase Nov 19, 2025
cab4e2c
Delete schema directory
adela-bytebase Nov 19, 2025
25ae57b
Update 1.0.1_create_table_t1.sql
adela-bytebase Nov 19, 2025
7161b04
Merge pull request #30 from adela-bytebase/adela-bytebase-patch-26
adela-bytebase Nov 19, 2025
57522be
Delete migrations-semver/1.0.1_create_table_t1.sql
adela-bytebase Nov 20, 2025
46ea15c
Create table 't1' with id and username columns
adela-bytebase Nov 20, 2025
ecb11aa
Add NOT NULL constraint and default value to username
adela-bytebase Nov 20, 2025
28c2f13
Merge pull request #35 from adela-bytebase/adela-bytebase-patch-31
adela-bytebase Nov 20, 2025
6409b88
Add SQL review standards documentation
adela-bytebase Nov 20, 2025
b11c6fb
Add custom rules for SQL review action
adela-bytebase Nov 20, 2025
139729a
Delete migrations-semver/1.0.1_create_table_t1.sql
adela-bytebase Nov 21, 2025
08738f5
Create table t1 with id and username columns
adela-bytebase Nov 21, 2025
26b16d5
Delete migrations-semver/1.0.1_create_t1.sql
adela-bytebase Nov 21, 2025
5317ff7
Create table t1 with id and username columns
adela-bytebase Nov 21, 2025
2a6052c
Add NOT NULL constraint and default value to username
adela-bytebase Nov 21, 2025
9372bda
Merge pull request #37 from adela-bytebase/adela-bytebase-patch-33
adela-bytebase Nov 21, 2025
5e525de
Create table 't2' with id and username columns
adela-bytebase Nov 21, 2025
ac1b3b5
Merge pull request #38 from adela-bytebase/adela-bytebase-patch-34
adela-bytebase Nov 21, 2025
dd70167
Delete migrations-semver/1.0.1_create_t1.sql
adela-bytebase Nov 26, 2025
4fe39f2
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Nov 26, 2025
e07b9e5
Modify username column to allow NULL values
adela-bytebase Nov 26, 2025
e6d0425
Update 1.0.1_create_table_t1.sql
adela-bytebase Nov 26, 2025
b2fc2b7
Merge pull request #39 from adela-bytebase/adela-bytebase-patch-35
adela-bytebase Nov 26, 2025
6dd5ee3
Delete migrations-semver/1.0.1_create_table_t1.sql
adela-bytebase Nov 26, 2025
f992fdc
Create table 't1' with id and username columns
adela-bytebase Nov 27, 2025
2ea783d
Set username column to NOT NULL in t1 table
adela-bytebase Nov 27, 2025
7b7b172
Merge pull request #40 from adela-bytebase/adela-bytebase-patch-36
adela-bytebase Nov 27, 2025
dce6825
Delete migrations-semver/1.0.1_create_table_t1.sql
adela-bytebase Dec 2, 2025
c701a0b
Create table t1 with id and username columns
adela-bytebase Dec 2, 2025
fcba31a
Update 1.0.1_create_t1.sql
adela-bytebase Dec 2, 2025
6852abf
Merge pull request #41 from adela-bytebase/adela-bytebase-patch-37
adela-bytebase Dec 2, 2025
413dcf8
Delete migrations-semver/1.0.1_create_t1.sql
adela-bytebase Dec 8, 2025
3310551
Fix path to sql-review.md in workflow
adela-bytebase Dec 12, 2025
1f95985
Create table t1 with id and username columns
adela-bytebase Dec 15, 2025
ab6061a
Make username column NOT NULL in t1 table
adela-bytebase Dec 15, 2025
c113b50
Merge pull request #43 from adela-bytebase/adela-bytebase-patch-39
adela-bytebase Dec 15, 2025
49c6a95
Update Docker image version in release workflow
adela-bytebase Dec 16, 2025
db2ca36
Update sql-review.md
adela-bytebase Dec 19, 2025
83ce6d3
Create public schema and define multiple tables
adela-bytebase Dec 19, 2025
754935f
Rename fakeTable to fake_table and change name type
adela-bytebase Dec 19, 2025
dcccea1
Update SQL review standards by removing guidelines
adela-bytebase Dec 19, 2025
96d6976
Rename column 'idd' to 'iddd' in fake_table
adela-bytebase Dec 19, 2025
381c6fa
Rename column 'iddd' to 'id' in fake_table
adela-bytebase Dec 19, 2025
e7e59da
Rename 'id' to 'idddd' in fake_table
adela-bytebase Dec 19, 2025
220e409
Rename column 'idddd' to 'idd' in fake_table
adela-bytebase Dec 19, 2025
7a6582b
Rename column 'idd' to 'idddd' in fake_table
adela-bytebase Dec 19, 2025
fbd7966
Update primary key column naming convention
adela-bytebase Dec 19, 2025
ca8ad6f
Update sql-review.md
adela-bytebase Dec 19, 2025
33c7424
Fix table creation syntax in schema.sql
adela-bytebase Dec 19, 2025
3fbc399
Update schema.sql
adela-bytebase Dec 19, 2025
e8ddb7b
Rename fake_table to fakeTable and update id column
adela-bytebase Dec 19, 2025
c345cd8
Rename fakeTable to fake_table in schema.sql
adela-bytebase Dec 19, 2025
c4ba2de
Merge pull request #44 from adela-bytebase/adela-bytebase-patch-40
adela-bytebase Dec 19, 2025
ed9a6ee
Delete migrations-semver/1.0.1_create_t1.sql
adela-bytebase Jan 7, 2026
c3a23c4
Create table t2 with id and username columns
adela-bytebase Jan 7, 2026
38d99ed
Make username column NOT NULL in t2 table
adela-bytebase Jan 7, 2026
6454688
Merge pull request #45 from adela-bytebase/adela-bytebase-patch-41
adela-bytebase Jan 7, 2026
b35b3ef
Update Docker image to latest version
adela-bytebase Jan 12, 2026
971ce2f
Delete migrations-semver/1.0.1_create_t2.sql
adela-bytebase Jan 12, 2026
923a4cf
Modify username column to allow NULL values
adela-bytebase Jan 13, 2026
367e06d
Make username column NOT NULL in t3 table
adela-bytebase Jan 13, 2026
64d7104
Merge pull request #46 from adela-bytebase/adela-bytebase-patch-42
adela-bytebase Jan 13, 2026
4909514
Delete migrations-semver/1.0.2_create_t3.sql
adela-bytebase Jan 15, 2026
771c0e4
Create table t1 with id and username columns
adela-bytebase Jan 15, 2026
8a38d94
Make username column NOT NULL in t1 table
adela-bytebase Jan 15, 2026
285405d
Merge pull request #47 from adela-bytebase/adela-bytebase-patch-43
adela-bytebase Jan 15, 2026
3333c75
Delete migrations-semver/1.0.1_create_t1.sql
adela-bytebase Jan 15, 2026
e500969
Create table 't1' with id and username columns
adela-bytebase Jan 15, 2026
26aeb71
Make username column NOT NULL in t1 table
adela-bytebase Jan 15, 2026
6bf5335
Merge pull request #48 from adela-bytebase/adela-bytebase-patch-44
adela-bytebase Jan 15, 2026
e4667dc
Delete migrations-semver/1.0.2_create_t1.sql
adela-bytebase Jan 20, 2026
64d1a9f
Rename table from 't0' to 't1' and modify 'username'
adela-bytebase Jan 20, 2026
1e186ef
Update 1.0.2_create_t1.sql
adela-bytebase Jan 20, 2026
fa24cd1
Merge pull request #49 from adela-bytebase/adela-bytebase-patch-45
adela-bytebase Jan 20, 2026
c9849a2
Delete migrations-semver/1.0.2_create_t1.sql
adela-bytebase Jan 21, 2026
ab1605e
Create table t1 with id and username columns
adela-bytebase Jan 21, 2026
2a28636
Make username column NOT NULL in t1 table
adela-bytebase Jan 21, 2026
3f97133
Merge pull request #50 from adela-bytebase/adela-bytebase-patch-46
adela-bytebase Jan 21, 2026
7a426c3
Delete migrations-semver/1.0.1_create_t1.sql
adela-bytebase Jan 27, 2026
495375e
Modify username column to allow NULL values
adela-bytebase Jan 27, 2026
e37d850
Make username column NOT NULL in t1 table
adela-bytebase Jan 27, 2026
8949c90
Merge pull request #51 from adela-bytebase/adela-bytebase-patch-47
adela-bytebase Jan 27, 2026
bd2b6c3
Delete migrations-semver/1.0.1_create_t1.sql
adela-bytebase Jan 28, 2026
73ec638
Create table t1 with id and username columns
adela-bytebase Feb 2, 2026
1a68184
Make username column NOT NULL in t1 table
adela-bytebase Feb 2, 2026
cc7e720
Merge pull request #52 from adela-bytebase/adela-bytebase-patch-48
adela-bytebase Feb 2, 2026
a951764
Delete migrations-semver/1.0.1_create_t1.sql
adela-bytebase Feb 2, 2026
7bbd8f2
Create table 't1' with id and username columns
adela-bytebase Feb 20, 2026
361cbab
Make username column NOT NULL in t1 table
adela-bytebase Feb 20, 2026
162aba2
Merge pull request #53 from adela-bytebase/adela-bytebase-patch-49
adela-bytebase Feb 20, 2026
41f0633
Delete migrations-semver/1.0.1_create_t1.sql
adela-bytebase Feb 23, 2026
0431061
Alter username column in t1 table
adela-bytebase Feb 24, 2026
112f5af
Make username column NOT NULL in t1 table
adela-bytebase Feb 24, 2026
f4fe662
Merge pull request #54 from adela-bytebase/adela-bytebase-patch-50
adela-bytebase Feb 24, 2026
a0a2d24
Create 1.0.2_add_nickname.sql
adela-bytebase Feb 24, 2026
a486c3a
Add initial data to public.t1 table
adela-bytebase Feb 24, 2026
8790558
Update 1.0.2_add_nickname.sql
adela-bytebase Feb 24, 2026
5cbb917
Merge pull request #55 from adela-bytebase/adela-bytebase-patch-51
adela-bytebase Feb 24, 2026
4ea5008
Delete migrations-semver/1.0.1_create_t1.sql
adela-bytebase Feb 26, 2026
846a096
Delete migrations-semver/1.0.2_add_nickname.sql
adela-bytebase Feb 26, 2026
827fdfe
Delete migrations-semver/1.0.3_add-some-data.sql
adela-bytebase Feb 26, 2026
f915c0f
Delete migrations-semver/1.0.0_create_table_t0.sql
adela-bytebase Mar 3, 2026
c99d204
Create table 't0' with id and username columns
adela-bytebase Mar 3, 2026
409525b
Merge pull request #56 from adela-bytebase/adela-bytebase-patch-52
adela-bytebase Mar 3, 2026
c8e5f1a
Create table t1 with id and username columns
adela-bytebase Mar 23, 2026
d3dac1f
Create table 't2' in migrations for version 1.0.2
adela-bytebase Mar 23, 2026
633faf1
Make username column NOT NULL in t2 table
adela-bytebase Mar 23, 2026
e62c966
Merge pull request #59 from adela-bytebase/adela-bytebase-patch-55
adela-bytebase Mar 23, 2026
8644fb6
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Mar 23, 2026
afdc95e
Create table t2 with id and username columns
adela-bytebase Mar 23, 2026
3c91da8
Make username column NOT NULL in t2 table
adela-bytebase Mar 23, 2026
727d61d
Merge pull request #60 from adela-bytebase/adela-bytebase-patch-56
adela-bytebase Mar 23, 2026
6088d10
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Mar 24, 2026
b0693c6
Create table t1 in migrations for version 1.0.2
adela-bytebase Mar 25, 2026
9b73db5
Add NOT NULL constraint to username column
adela-bytebase Mar 25, 2026
a44a719
Merge pull request #61 from adela-bytebase/adela-bytebase-patch-57
adela-bytebase Mar 25, 2026
732d59e
Delete migrations-semver/1.0.2_create-t1.sql
adela-bytebase Mar 26, 2026
870fd76
Create table t2 with id and username columns
adela-bytebase Mar 26, 2026
42a7991
Make username column in t2 table NOT NULL
adela-bytebase Mar 26, 2026
c97d8ee
Merge pull request #63 from adela-bytebase/adela-bytebase-patch-59
adela-bytebase Mar 26, 2026
86e61d2
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Mar 27, 2026
7ec7ea2
Create table 't1' with id and username columns
adela-bytebase Mar 27, 2026
223feef
Make username column NOT NULL in t1 table
adela-bytebase Mar 27, 2026
0c0e2f1
Merge pull request #64 from adela-bytebase/adela-bytebase-patch-60
adela-bytebase Mar 27, 2026
c77ea6d
Delete migrations-semver/1.0.2_create_t1.sql
adela-bytebase Mar 30, 2026
5adf16f
Create table t1 with id and username columns
adela-bytebase Apr 2, 2026
089044a
Update 1.0.2_create_t1.sql
adela-bytebase Apr 2, 2026
18cb5b1
Merge pull request #65 from adela-bytebase/adela-bytebase-patch-61
adela-bytebase Apr 2, 2026
6028a84
Delete migrations-semver/1.0.2_create_t1.sql
adela-bytebase Apr 9, 2026
c7db7e2
Create 1.0.2_create_t2.sql
adela-bytebase Apr 10, 2026
ee16357
Update 1.0.2_create_t2.sql
adela-bytebase Apr 10, 2026
b899159
Merge pull request #66 from adela-bytebase/adela-bytebase-patch-62
adela-bytebase Apr 10, 2026
6912fd6
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Apr 13, 2026
cb3cdf0
Create table t2 with id and username columns
adela-bytebase Apr 13, 2026
78715a9
Update 1.0.2_create_t2.sql
adela-bytebase Apr 13, 2026
5773ec6
Merge pull request #67 from adela-bytebase/adela-bytebase-patch-63
adela-bytebase Apr 13, 2026
1658ced
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Apr 13, 2026
092b4dd
Create table t2 with id and username columns
adela-bytebase Apr 13, 2026
c5f945e
Make username column NOT NULL in t2 table
adela-bytebase Apr 13, 2026
2e760d5
Merge pull request #68 from adela-bytebase/adela-bytebase-patch-64
adela-bytebase Apr 13, 2026
b04dce5
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Apr 13, 2026
ea4f3d0
Modify 'username' column in 't2' table
adela-bytebase Apr 16, 2026
26ff4ca
Make username column NOT NULL in t2 table
adela-bytebase Apr 16, 2026
a7f9a69
Merge pull request #69 from adela-bytebase/adela-bytebase-patch-65
adela-bytebase Apr 16, 2026
114e11e
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Apr 16, 2026
62dc16d
Create table t2 with id and username columns
adela-bytebase Apr 16, 2026
cb2c7f6
Update 1.0.2_create_t2.sql
adela-bytebase Apr 16, 2026
69260e4
Update 1.0.2_create_t2.sql
adela-bytebase Apr 16, 2026
45da324
Merge pull request #70 from adela-bytebase/adela-bytebase-patch-66
adela-bytebase Apr 16, 2026
c4f9e8c
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Apr 17, 2026
80e4c11
Create table t0 with id and username columns
adela-bytebase Apr 17, 2026
5155ac4
Create table 't2' in public schema
adela-bytebase Apr 17, 2026
e33ca50
Make username column NOT NULL in t2 table
adela-bytebase Apr 17, 2026
0a580c4
Merge pull request #71 from adela-bytebase/adela-bytebase-patch-67
adela-bytebase Apr 17, 2026
7839adc
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Apr 20, 2026
deb91bf
Create table 't2' in migrations
adela-bytebase Apr 21, 2026
6138801
Make username column NOT NULL in t2 table
adela-bytebase Apr 21, 2026
7ecd025
Merge pull request #72 from adela-bytebase/adela-bytebase-patch-68
adela-bytebase Apr 21, 2026
469c042
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Apr 21, 2026
2b84de8
add t2
adela-bytebase May 27, 2026
fe609d3
Update 1.0.2_create_t2.sql
adela-bytebase May 27, 2026
b6e76a9
Merge pull request #73 from adela-bytebase/adela-bytebase-patch-69
adela-bytebase May 27, 2026
db0513e
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase May 27, 2026
0f19c06
Create table t2 with id and username columns
adela-bytebase May 29, 2026
13dd670
Merge pull request #74 from adela-bytebase/adela-bytebase-patch-70
adela-bytebase May 29, 2026
78ec147
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Jun 4, 2026
c1dc528
Create table t2 with id and username columns
adela-bytebase Jun 4, 2026
1641448
Update 1.0.2_creat_t2.sql
adela-bytebase Jun 4, 2026
2ae9b19
Merge pull request #75 from adela-bytebase/adela-bytebase-patch-71
adela-bytebase Jun 4, 2026
af4fc0c
Delete migrations-semver/1.0.2_creat_t2.sql
adela-bytebase Jun 12, 2026
a32e82c
Create 1.0.2_create_t2.sql
adela-bytebase Jun 17, 2026
a556a94
Make username column NOT NULL in t2 table
adela-bytebase Jun 17, 2026
5040d46
Merge pull request #76 from adela-bytebase/adela-bytebase-patch-72
adela-bytebase Jun 17, 2026
9bdfabb
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Jun 17, 2026
9bdd57f
Create table t2 with id and username columns
adela-bytebase Jun 30, 2026
00067e0
Modify username column in t2 table
adela-bytebase Jun 30, 2026
da586b6
Set username column to NOT NULL in t2 table
adela-bytebase Jun 30, 2026
a4858c4
Merge pull request #78 from adela-bytebase/adela-bytebase-patch-74
adela-bytebase Jun 30, 2026
99262b2
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Jul 6, 2026
c87c7d6
Create table 't0' with id and username columns
adela-bytebase Jul 6, 2026
6c2a86b
Create table 't2' in public schema
adela-bytebase Jul 6, 2026
03ab6cf
Add NOT NULL constraint to username column in t2
adela-bytebase Jul 6, 2026
8f38ec4
Merge pull request #79 from adela-bytebase/adela-bytebase-patch-75
adela-bytebase Jul 6, 2026
264d03d
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Jul 6, 2026
81d7603
Create table t2 with id and username columns
adela-bytebase Jul 20, 2026
81cfa50
Make username column NOT NULL in t2 table
adela-bytebase Jul 20, 2026
87353fb
Merge pull request #80 from adela-bytebase/adela-bytebase-patch-76
adela-bytebase Jul 20, 2026
45d316f
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Jul 20, 2026
5272178
Create table 't2' in migrations-semver
adela-bytebase Jul 21, 2026
59bf87c
Update 1.0.2_create_t2.sql
adela-bytebase Jul 21, 2026
5eb1973
Merge pull request #81 from adela-bytebase/adela-bytebase-patch-77
adela-bytebase Jul 21, 2026
6733c3e
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Jul 21, 2026
fa5dfc6
Create table t2 with id and username columns
adela-bytebase Jul 22, 2026
56bfbdc
Make username column NOT NULL in t2 table
adela-bytebase Jul 22, 2026
816766e
Merge pull request #82 from adela-bytebase/adela-bytebase-patch-78
adela-bytebase Jul 22, 2026
66b0b07
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Jul 22, 2026
405976b
Modify 'username' column to allow NULL values
adela-bytebase Jul 23, 2026
4fe7e84
Make username column NOT NULL in t2 table
adela-bytebase Jul 23, 2026
e071669
Merge pull request #83 from adela-bytebase/adela-bytebase-patch-79
adela-bytebase Jul 23, 2026
d63cb86
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Jul 27, 2026
889bc9f
Create table t2 with id and username columns
adela-bytebase Jul 27, 2026
2bddcc6
Make username column NOT NULL in t2 table
adela-bytebase Jul 27, 2026
40acf65
Merge pull request #84 from adela-bytebase/adela-bytebase-patch-80
adela-bytebase Jul 27, 2026
ef21d52
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Jul 28, 2026
bfde8dd
Create table t2 with id and username columns
adela-bytebase Jul 28, 2026
bb9efcb
Add NOT NULL constraint to username column in t2
adela-bytebase Jul 28, 2026
1644836
Merge pull request #85 from adela-bytebase/adela-bytebase-patch-81
adela-bytebase Jul 28, 2026
62df32c
Delete migrations-semver/1.0.2_create_t2.sql
adela-bytebase Jul 28, 2026
dd2278b
Add declarative SDL workflow for MySQL
adela-bytebase Jul 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .bytebase/sql-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# .bytebase/sql-review.md
# SQL Review Standards

## 1. Table Naming Convention
- All table names must be in snake_case
4 changes: 2 additions & 2 deletions .github/workflows/chatops-migrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ on:
types: [created]

env:
BYTEBASE_URL: https://demo.bytebase.com
BYTEBASE_URL: https://valid-just-tadpole.ngrok-free.app
BYTEBASE_SERVICE_ACCOUNT: api@service.bytebase.com # set service account via environment variable
BYTEBASE_SERVICE_ACCOUNT_SECRET: ${{ secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET }} # set service account secret via environment variable
BYTEBASE_PROJECT: "projects/hr"
BYTEBASE_PROJECT: "projects/project-sample"
FILE_PATTERN: "migrations-semver/*.sql"

jobs:
Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/declarative-release-action-mysql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Declarative rollout for MySQL using bytebase-action image

on:
push:
branches:
- main
paths:
- "schema-mysql/*.sql"

# cancel previous workflow run if a new workflow run is triggered
# to prevent multiple rollout
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

env:
BYTEBASE_URL: https://valid-just-tadpole.ngrok-free.app
BYTEBASE_SERVICE_ACCOUNT: api@service.bytebase.com # set service account via environment variable
BYTEBASE_SERVICE_ACCOUNT_SECRET: ${{ secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET }} # set service account secret via environment variable
BYTEBASE_PROJECT: "projects/mysql-project"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build app and upload
run: |
echo "Building..."
echo "Build done!"
echo "Uploading..."
echo "Upload done!"
create-rollout:
needs: build
runs-on: ubuntu-latest # use self-hosted machines if your Bytebase runs in internal networks.
container:
image: bytebase/bytebase-action:latest
outputs:
bytebase-plan: ${{ steps.set-output.outputs.plan }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Roll out database change
env:
BYTEBASE_TARGETS: "instances/mysql-test-instance-05k8/databases/testdb,instances/mysql-test-instance-05k8/databases/proddb"
FILE_PATTERN: "schema-mysql/*.sql"
BYTEBASE_OUTPUT: ${{ runner.temp }}/bytebase-metadata.json
run: |
bytebase-action rollout --url=${{ env.BYTEBASE_URL }} --project=${{ env.BYTEBASE_PROJECT }} --file-pattern=${{ env.FILE_PATTERN }} --targets=${{ env.BYTEBASE_TARGETS }} --declarative --output=${{ env.BYTEBASE_OUTPUT }}
- name: Set output
id: set-output
run: |
PLAN=$(jq -r .plan ${{ runner.temp }}/bytebase-metadata.json)
echo "plan=$PLAN" >> $GITHUB_OUTPUT
deploy-to-test:
needs: create-rollout
runs-on: ubuntu-latest # use self-hosted machines if your Bytebase runs in internal networks.
environment: test
container:
image: bytebase/bytebase-action:latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Roll out database change
env:
BYTEBASE_TARGET_STAGE: environments/test
run: |
bytebase-action rollout --url=${{ env.BYTEBASE_URL }} --project=${{ env.BYTEBASE_PROJECT }} --target-stage=${{ env.BYTEBASE_TARGET_STAGE }} --plan=${{ needs.create-rollout.outputs.bytebase-plan }}
- name: Deploy app
run: |
echo "Deploying app to test environment..."
echo "Deploy app to test environment done!"
deploy-to-prod:
needs:
- deploy-to-test
- create-rollout
runs-on: ubuntu-latest
environment: prod
container:
image: bytebase/bytebase-action:latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: rollout
env:
BYTEBASE_TARGET_STAGE: environments/prod
run: |
bytebase-action rollout --url=${{ env.BYTEBASE_URL }} --project=${{ env.BYTEBASE_PROJECT }} --target-stage=${{ env.BYTEBASE_TARGET_STAGE }} --plan=${{ needs.create-rollout.outputs.bytebase-plan }}
- name: Deploy app
run: |
echo "Deploying app to prod environment..."
echo "Deploy app to prod environment done!"
4 changes: 2 additions & 2 deletions .github/workflows/declarative-release-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ concurrency:
cancel-in-progress: true

env:
BYTEBASE_URL: https://demo.bytebase.com
BYTEBASE_URL: https://valid-just-tadpole.ngrok-free.app
BYTEBASE_SERVICE_ACCOUNT: api@service.bytebase.com # set service account via environment variable
BYTEBASE_SERVICE_ACCOUNT_SECRET: ${{ secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET }} # set service account secret via environment variable
BYTEBASE_PROJECT: "projects/hr"
BYTEBASE_PROJECT: "projects/project-sample"

jobs:
build:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/declarative-sql-review-action-mysql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: SQL review on pull request with declarative release for MySQL using bytebase-action image

on:
pull_request:
branches:
- main
paths:
- "schema-mysql/*.sql"
- ".bytebase/sql-review.md"

jobs:
check-release-on-prod:
permissions:
pull-requests: write # write permission required to allow the action writes the check results to the comment.
runs-on: ubuntu-latest # use self-hosted machines if your Bytebase runs in internal networks.
container:
image: bytebase/bytebase-action:latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # set GITHUB_TOKEN because the 'Check release' step needs it to comment the pull request with check results.
BYTEBASE_URL: https://valid-just-tadpole.ngrok-free.app
BYTEBASE_SERVICE_ACCOUNT: api@service.bytebase.com # set service account via environment variable
BYTEBASE_SERVICE_ACCOUNT_SECRET: ${{ secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET }} # set service account secret via environment variable
BYTEBASE_PROJECT: "projects/mysql-project"
BYTEBASE_TARGETS: "instances/mysql-test-instance-05k8/databases/proddb"
FILE_PATTERN: "schema-mysql/*.sql"
run: |
bytebase-action check --url=${{ env.BYTEBASE_URL }} --project=${{ env.BYTEBASE_PROJECT }} --targets=${{ env.BYTEBASE_TARGETS }} --file-pattern=${{ env.FILE_PATTERN }} --declarative --custom-rules "$(cat .bytebase/sql-review.md)"
7 changes: 4 additions & 3 deletions .github/workflows/declarative-sql-review-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main
paths:
- "schema/*.sql"
- ".bytebase/sql-review.md"

jobs:
check-release-on-prod:
Expand All @@ -20,11 +21,11 @@ jobs:
- name: Check release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # set GITHUB_TOKEN because the 'Check release' step needs it to comment the pull request with check results.
BYTEBASE_URL: https://demo.bytebase.com
BYTEBASE_URL: https://valid-just-tadpole.ngrok-free.app
BYTEBASE_SERVICE_ACCOUNT: api@service.bytebase.com # set service account via environment variable
BYTEBASE_SERVICE_ACCOUNT_SECRET: ${{ secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET }} # set service account secret via environment variable
BYTEBASE_PROJECT: "projects/hr"
BYTEBASE_PROJECT: "projects/project-sample"
BYTEBASE_TARGETS: "instances/prod-sample-instance/databases/hr_prod"
FILE_PATTERN: "schema/*.sql"
run: |
bytebase-action check --url=${{ env.BYTEBASE_URL }} --project=${{ env.BYTEBASE_PROJECT }} --targets=${{ env.BYTEBASE_TARGETS }} --file-pattern=${{ env.FILE_PATTERN }} --declarative
bytebase-action check --url=${{ env.BYTEBASE_URL }} --project=${{ env.BYTEBASE_PROJECT }} --targets=${{ env.BYTEBASE_TARGETS }} --file-pattern=${{ env.FILE_PATTERN }} --declarative --custom-rules "$(cat .bytebase/sql-review.md)"
4 changes: 2 additions & 2 deletions .github/workflows/release-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ on:
- "migrations-semver/*.sql"

env:
BYTEBASE_URL: https://demo.bytebase.com
BYTEBASE_URL: https://valid-just-tadpole.ngrok-free.app
BYTEBASE_SERVICE_ACCOUNT: api@service.bytebase.com # set service account via environment variable
BYTEBASE_SERVICE_ACCOUNT_SECRET: ${{ secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET }} # set service account secret via environment variable
BYTEBASE_PROJECT: "projects/hr"
BYTEBASE_PROJECT: "projects/project-sample"

jobs:
build:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sql-review-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
- name: Check release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # set GITHUB_TOKEN because the 'Check release' step needs it to comment the pull request with check results.
BYTEBASE_URL: https://demo.bytebase.com
BYTEBASE_URL: https://valid-just-tadpole.ngrok-free.app
BYTEBASE_SERVICE_ACCOUNT: api@service.bytebase.com # set service account via environment variable
BYTEBASE_SERVICE_ACCOUNT_SECRET: ${{ secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET }} # set service account secret via environment variable
BYTEBASE_PROJECT: "projects/hr"
BYTEBASE_PROJECT: "projects/project-sample"
BYTEBASE_TARGETS: "instances/prod-sample-instance/databases/hr_prod"
FILE_PATTERN: "migrations-semver/*.sql"
run: |
Expand Down
5 changes: 0 additions & 5 deletions migrations-semver/1.0.0_init.sql

This file was deleted.

4 changes: 4 additions & 0 deletions migrations-semver/1.0.1_create_t0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CREATE TABLE "public"."t0" (
"id" serial PRIMARY KEY,
"username" text NOT NULL
)
5 changes: 0 additions & 5 deletions migrations-semver/1.0.1_init_data_dml.sql

This file was deleted.

1 change: 0 additions & 1 deletion migrations-semver/1.1.1_comment.sql

This file was deleted.

1 change: 0 additions & 1 deletion migrations-semver/1.13.0_phone.sql

This file was deleted.

1 change: 0 additions & 1 deletion migrations-semver/1.14.0_email.sql

This file was deleted.

2 changes: 0 additions & 2 deletions migrations-semver/1.3.5_nickname.sql

This file was deleted.

15 changes: 15 additions & 0 deletions schema-mysql/schema.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CREATE TABLE `employee` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `employee_email_key` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `department` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `department_name_key` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
8 changes: 6 additions & 2 deletions schema/schema.sql
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
COMMENT ON SCHEMA "public" IS 'standard public schema';

CREATE TABLE "public"."fake_table" (
"id" serial,
"name" text
);

CREATE TABLE "public"."audit" (
"id" serial,
"operation" text NOT NULL,
"query" text,
"user_name" text NOT NULL,
"changed_at" timestamptz DEFAULT now(),
"changed_at" timestamp(6) with time zone DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "audit_pkey" PRIMARY KEY (id)
);

Expand All @@ -18,7 +23,6 @@ CREATE INDEX "idx_audit_username" ON ONLY "public"."audit" (user_name);
CREATE TABLE "public"."department" (
"dept_no" text NOT NULL,
"dept_name" text NOT NULL,
created_at timestamptz DEFAULT now(),
CONSTRAINT "department_pkey" PRIMARY KEY (dept_no),
CONSTRAINT "department_dept_name_key" UNIQUE (dept_name)
);
Expand Down
Loading