pgroll/pkg/state
Andrew Farries 7cef8b1213
Distinguish inferred migrations by timestamp for statements within the same transaction (#362)
Set `created_at` and `updated_at` explicitly when inserting inferred
migrations into the migrations table.

When two statements are run in a transaction, we need to explicitly
insert `statement_timestamp()` into the `created_at` and `updated_at`
fields rather than relying on the table default of `current_timestamp`.

`current_timestamp` is the same for all statements in a transaction,
which causes problems when ordering statements by `created_at`.


Fixes #361
2024-06-25 14:57:18 +01:00
..
errors.go License check in github actions (#123) 2023-09-22 10:31:49 +00:00
state_test.go Distinguish inferred migrations by timestamp for statements within the same transaction (#362) 2024-06-25 14:57:18 +01:00
state.go Distinguish inferred migrations by timestamp for statements within the same transaction (#362) 2024-06-25 14:57:18 +01:00
status.go Move logic for the status command into the state and migrations packages (#205) 2023-11-22 12:36:54 +00:00