updated db creation flow#204
Conversation
Greptile SummaryThis PR introduces a
Confidence Score: 5/5Safe to merge — all previously flagged edge cases are addressed and the new status lifecycle is correctly gated, ordered, and best-effort where appropriate. The provisioning/ready/failed lifecycle is implemented end-to-end: status is set before collection creation, flipped to ready only after all resources transfer, per-database failures in the sweep do not strand siblings, and failed databases are recovered rather than skipped forever. No files require special attention. Important Files Changed
Reviews (15): Last reviewed commit: "updated" | Re-trigger Greptile |
|
@greptile The setPreserveDates(false) override fires for Firebase, MySQL, and Appwrite API source migrations as well as the SOURCE_DATABASE path. Before this PR, the outer import() loop held setPreserveDates(true) so that explicitly-set $createdAt/$updatedAt values were honoured. Now those values are discarded for every database creation or overwrite, meaning users migrating from any source will see today's date instead of the original database creation date on the destination. src/Migration/Destinations/Appwrite.php — the importDatabaseResource switch case where setPreserveDates(false) is set without a source-type guard this is totally fine as we want this only to point to the latest date instead of the old present backup date for the database |
|
Got it, that's a valid intentional choice — using the current date on the destination makes sense when the goal is to track when the database was provisioned rather than when the source backup was created. I'll withdraw the concern. Tip: You can customize Greptile's behavior for this repo with |
| $database->setAttribute('status', $status); | ||
| $this->dbForProject->updateDocument(self::META_DATABASES, $databaseId, $database); |
There was a problem hiding this comment.
Let's use a partial update here
| return $this->source; | ||
| } | ||
|
|
||
| public function supportsDatabaseStatus(): bool |
There was a problem hiding this comment.
backups doesn't inherit the Appwrite source and Appwrite source only take the source as api or databse
so added this support method so that it can be overriden
Backups inherit the source
No description provided.