Ids for new app migrations.
Apps and framework libraries share one schema_migrations id space, and
framework ids end in an odd second (test/wagoe/migration_ids_test.clj). So
an app id ends in an even one and never collides with a framework id.
Ids for new app migrations. Apps and framework libraries share one `schema_migrations` id space, and framework ids end in an odd second (test/wagoe/migration_ids_test.clj). So an app id ends in an even one and never collides with a framework id.
(id-of file-name)The numeric id a migration file name starts with, or nil.
The numeric id a migration file name starts with, or nil.
(next-id used now)First even-second yyyyMMddHHmmss id at or after now, a UTC LocalDateTime,
not in used.
Two migrations made in one second would share an id, and migratus then refuses the whole run, so step forward until the id is free. Stepping seconds rather than adding sub-second digits keeps ids 14 digits: a longer one would sort after every existing migration forever.
First even-second yyyyMMddHHmmss id at or after `now`, a UTC LocalDateTime, not in `used`. Two migrations made in one second would share an id, and migratus then refuses the whole run, so step forward until the id is free. Stepping seconds rather than adding sub-second digits keeps ids 14 digits: a longer one would sort after every existing migration forever.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |