HomePhabricator
Diffusion Comm f50455b6eeb4

[native/sqlite] add `IF NOT EXISTS` constraint to migrations

Description

[native/sqlite] add IF NOT EXISTS constraint to migrations

Summary:
More context in this linear task with bug description.

This diff allows running all migration multiple times without crashing.

Test Plan:

  1. This reproduce plan
  2. Comment this line and reload app twice (without logout to check if this works on the same database instance)

Reviewers: tomek, jon, atul, marcin

Reviewed By: tomek, marcin

Subscribers: max, ashoat, atul, abosh

Differential Revision: https://phab.comm.dev/D5290

Details

Provenance
kamilAuthored on Oct 7 2022, 6:45 AM
ashoatCommitted on Oct 7 2022, 6:46 AM
Reviewer
tomek
Differential Revision
D5290: [native/sqlite] add `IF NOT EXISTS` constraint to migrations
Parents
rCOMM147f0455e29e: Revert "[native/sqlite] infer db schema from `sqlite_orm`"
Branches
Unknown
Tags
Unknown