-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* . * postgres * mariadb mysql * . * . * . * . * fix test only for create table * Add new table creation and column comment functionality - Introduced a new `table` procedure to create tables with specified names and default properties. - Updated the `create` procedure to accept variable arguments for tables. - Added test cases for creating tables with comments on columns in MariaDB, MySQL, and PostgreSQL.
- Loading branch information
1 parent
b873356
commit 522e052
Showing
36 changed files
with
656 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
nim c -d:reset ./migrations/migrate.nim | ||
nim c ./seeder/develop | ||
nim c -d:reset --threads:off ./migrations/migrate.nim | ||
nim c --threads:off ./seeder/develop | ||
|
||
./migrations/migrate | ||
./seeder/develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
import ../../../src/allographer/schema_builder | ||
import ../connection | ||
|
||
proc init_databaase*() = | ||
proc initDatabaase*() = | ||
## 0001 | ||
rdb.create([ | ||
table("user", [ | ||
Column.uuid("id").index(), | ||
Column.string("name"), | ||
Column.string("email"), | ||
Column.string("password"), | ||
Column.integer("created_at").index(), | ||
Column.integer("updated_at").index(), | ||
]), | ||
Column.uuid("id").index().comment("User ID"), | ||
Column.string("name").comment("User name"), | ||
Column.string("email").comment("User email address"), | ||
Column.string("password").comment("User password"), | ||
Column.integer("created_at").index().comment("Created at"), | ||
Column.integer("updated_at").index().comment("Updated at"), | ||
], "User table"), | ||
table("post", [ | ||
Column.uuid("id").index(), | ||
Column.string("title"), | ||
Column.string("content"), | ||
Column.strForeign("user_id").reference("id").onTable("user"), | ||
Column.integer("created_at").index(), | ||
Column.integer("updated_at").index(), | ||
]) | ||
Column.uuid("id").index().comment("Post ID"), | ||
Column.string("title").comment("Post title"), | ||
Column.string("content").comment("Post content"), | ||
Column.strForeign("user_id").reference("id").onTable("user").comment("User ID"), | ||
Column.integer("created_at").index().comment("Created at"), | ||
Column.integer("updated_at").index().comment("Updated at"), | ||
], "Post table"), | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
nim c ./migrations/migrate.nim | ||
nim c database/seeder/production | ||
nim c --threads:off ./migrations/migrate.nim | ||
nim c --threads:off database/seeder/production | ||
|
||
./migrations/migrate | ||
APP_ENV=production ./database/seeder/production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
nim c -d:reset ./migrations/migrate.nim | ||
nim c database/seeder/staging | ||
nim c -d:reset --threads:off./migrations/migrate.nim | ||
nim c --threads:off database/seeder/staging | ||
|
||
./migrations/migrate | ||
APP_ENV=staging ./database/seeder/staging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.