-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run tests against PostgreSQL, fix compatibility #170
Changes from 21 commits
6b42328
5a6ccd4
63b0df2
2a0c0df
51908c5
21e41b6
b5276a8
25567a1
bad9952
3dada54
d21efa5
e22f704
a598bfe
a0f86e1
8c5199c
0935387
1aad8f0
413cfbb
590dbd3
1ca7976
05d2ad0
620f34b
4236230
f34b4e7
3d4acc2
971cf99
7894fd9
275e19b
ae6a6c4
c2b657f
e77ee40
4459eff
50e7168
2abfd81
06ac905
79637c9
db0cccc
89f0e2c
ba3a7ff
38bf7f8
1884016
d97e8b9
3980942
7ab5a45
f1cb76d
c3ba146
eb762f2
12a1028
2cde8b9
213709b
df1d9b9
89efbd7
ef08996
65130de
c51434f
d2129dd
7c1275c
818139d
6778ba4
0c0fbcc
e7fd225
5369d26
cbad270
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,12 @@ CREATE TABLE IF NOT EXISTS tasks ( | |
-- Create a unique index using `COALESCE`. A regular `UNIQUE` clause will | ||
-- consider two rows that have at least one `null` value to always be distinct | ||
-- but we want to check for equality including `null` values. | ||
CREATE UNIQUE INDEX ux_tasks ON tasks ( | ||
name, | ||
COALESCE(document_id, 0), | ||
COALESCE(document_view_id, 0) | ||
); | ||
-- @TODO: This fails using PostgreSQL | ||
-- CREATE UNIQUE INDEX ux_tasks ON tasks ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👆 Upsi, this doesn't seem to work on PostgreSQL 😢 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the migrations fail all tests fail for PostgreSQL and MySQL currently There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed now via: CREATE UNIQUE INDEX ux_tasks ON tasks (
name,
COALESCE(document_id, '0'),
COALESCE(document_view_id, '0')
); |
||
-- name, | ||
-- COALESCE(document_id, 0), | ||
-- COALESCE(document_view_id, 0) | ||
--); | ||
|
||
-- Create an index because primary keys can not contain `null` columns. | ||
CREATE INDEX idx_tasks ON tasks (name, document_id, document_view_id); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,6 @@ pub async fn create_database(url: &str) -> Result<()> { | |
Any::create_database(url).await?; | ||
} | ||
|
||
Any::drop_database(url); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What was that? 😱 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it was never |
||
|
||
Ok(()) | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👆
BLOB
is not known for PostgreSQL?