Page MenuHomeElementl

[buildkite][core] Adding checks for `db.text("CURRENT_TIMESTAMP")`
ClosedPublic

Authored by sidkmenon on Feb 16 2021, 9:51 PM.

Details

Summary

Checks that CURRENT_TIMESTAMP (w/o precision specified) isn't used because it is incompatible with MySQL.

Depends on D6399

Test Plan

Integration

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

a few comments; afterwards, good to go

scripts/check_schemas.py
48

would use isinstance(column.type, db.String) instead

also, unless column_type_str is used elsewhere, we can move it into the following if block

50

i'm not sure this check is needed (as anyone changing the type of the column would cause a breaking change) but i guess it doesn't hurt

This revision now requires changes to proceed.Feb 17 2021, 5:31 PM

Modifying validate_column checks to check for CURRENT_TIMESTAMP instead

sidkmenon retitled this revision from [buildkite][core] Modifying schema checks script to work with columns where migration is planned to [buildkite][core] Adding checks for `db.text("CURRENT_TIMESTAMP")`.Feb 18 2021, 10:03 PM
sidkmenon edited the summary of this revision. (Show Details)
scripts/check_schemas.py
76
77

"semantically equivalent" -> "To allow schema compatibility between MySQL, Postgres, and SQLite, ..."

Try to capitalize sentences, avoid abbreviations (ie w/o), and end with periods.

78
sidkmenon marked 2 inline comments as done.

responding to @catherinewu's comments

This revision is now accepted and ready to land.Feb 22 2021, 6:16 PM