-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor testing to use new TableDB schema
Added TableDB schema for testing purposes, including table definitions for 'customers', 'users', 'address', and 'employees'. Updated tests to utilize TableDB instead of Northwind for schema consistency in the specs. Adjusted file permissions setup in the workflow to accommodate the new test database. Included .vscode directory in .gitignore for local environment isolation. Enhances test database structure clarity and modularity.
- Loading branch information
Showing
4 changed files
with
53 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
TableDB = Cql::Schema.build( | ||
name: :tabledb, | ||
adapter: Cql::Adapter::Sqlite, | ||
uri: "sqlite3://spec/db/tabledb.db") do | ||
table :customers do | ||
primary :id, Int32 | ||
column :name, String | ||
column :city, String | ||
column :balance, Int32 | ||
timestamps | ||
end | ||
|
||
table :users do | ||
primary :id, Int32 | ||
column :name, String | ||
column :email, String | ||
column :age, Int32 | ||
timestamps | ||
end | ||
|
||
table :address do | ||
primary :id, Int32 | ||
column :user_id, Int64, null: false | ||
column :street, String | ||
column :city, String | ||
column :zip, String | ||
timestamps | ||
end | ||
|
||
table :employees do | ||
primary :id, Int32 | ||
column :name, String | ||
column :email, String | ||
column :phone, String | ||
column :department, String | ||
timestamps | ||
end | ||
end |
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