From d0b97541a25cde119815f4048c4c8a7a26502d2b Mon Sep 17 00:00:00 2001 From: ajabeckett <31599074+ajabeckett@users.noreply.github.com> Date: Thu, 2 Nov 2023 09:54:02 -0700 Subject: [PATCH] fix: add missing sitenote migration (#947) * fix: add missing sitenote migration * fix: linting * fix: add copyright * Update terraso_backend/apps/project_management/migrations/0025_sitenote_deleted_at_sitenote_deleted_by_cascade_and_more.py --------- Co-authored-by: Paul Schreiber --- ...at_sitenote_deleted_by_cascade_and_more.py | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 terraso_backend/apps/project_management/migrations/0025_sitenote_deleted_at_sitenote_deleted_by_cascade_and_more.py diff --git a/terraso_backend/apps/project_management/migrations/0025_sitenote_deleted_at_sitenote_deleted_by_cascade_and_more.py b/terraso_backend/apps/project_management/migrations/0025_sitenote_deleted_at_sitenote_deleted_by_cascade_and_more.py new file mode 100644 index 000000000..f4a2a3bfc --- /dev/null +++ b/terraso_backend/apps/project_management/migrations/0025_sitenote_deleted_at_sitenote_deleted_by_cascade_and_more.py @@ -0,0 +1,47 @@ +# Copyright © 2023 Technology Matters +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + +# Generated by Django 4.2.6 on 2023-10-30 16:03 + +import uuid + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("project_management", "0024_project_measurement_units"), + ] + + operations = [ + migrations.AddField( + model_name="sitenote", + name="deleted_at", + field=models.DateTimeField(db_index=True, editable=False, null=True), + ), + migrations.AddField( + model_name="sitenote", + name="deleted_by_cascade", + field=models.BooleanField(default=False, editable=False), + ), + migrations.RemoveField(model_name="sitenote", name="id"), + migrations.AddField( + model_name="sitenote", + name="id", + field=models.UUIDField( + default=uuid.uuid4, editable=False, primary_key=True, serialize=False + ), + ), + ]