lifetracker/packages/db/migrations/0008_gray_selene.sql

8 lines
479 B
SQL

ALTER TABLE `label` ADD `parentId` text REFERENCES label(id);--> statement-breakpoint
/*
SQLite does not support "Creating foreign key on existing column" out of the box, we do not generate automatic migration for that, so it has to be done manually
Please refer to: https://www.techonthenet.com/sqlite/tables/alter_table.php
https://www.sqlite.org/lang_altertable.html
Due to that we don't generate migration automatically and it has to be done manually
*/