diff options
| author | Santo Cariotti <santo@dcariotti.me> | 2022-09-20 13:44:33 +0000 |
|---|---|---|
| committer | Santo Cariotti <santo@dcariotti.me> | 2022-09-20 13:44:33 +0000 |
| commit | e0d034dc818c699f4e6ecdd5a027ff7377421acd (patch) | |
| tree | 14dabfcb1162cca86f239a04ea66ed4ad9417f41 /migrations/20220912114912_add-models-uploads-table.sql | |
| parent | b65ad29774d2a58372058d1aeafca5a423efb8d4 (diff) | |
Delete uploads on cascade
Diffstat (limited to 'migrations/20220912114912_add-models-uploads-table.sql')
| -rw-r--r-- | migrations/20220912114912_add-models-uploads-table.sql | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/migrations/20220912114912_add-models-uploads-table.sql b/migrations/20220912114912_add-models-uploads-table.sql index 6647c69..5b19f8e 100644 --- a/migrations/20220912114912_add-models-uploads-table.sql +++ b/migrations/20220912114912_add-models-uploads-table.sql @@ -1,6 +1,6 @@ CREATE TABLE uploads ( id SERIAL PRIMARY KEY, - model_id INTEGER REFERENCES models(id) NOT NULL, + model_id INTEGER REFERENCES models(id) ON DELETE CASCADE NOT NULL, filepath VARCHAR NOT NULL, created TIMESTAMP NOT NULL ); |
