|
| 1 | +# Legadilo |
| 2 | +# Copyright (C) 2023-2025 by Legadilo contributors. |
| 3 | +# |
| 4 | +# This program is free software: you can redistribute it and/or modify |
| 5 | +# it under the terms of the GNU Affero General Public License as published by |
| 6 | +# the Free Software Foundation, either version 3 of the License, or |
| 7 | +# (at your option) any later version. |
| 8 | +# |
| 9 | +# This program is distributed in the hope that it will be useful, |
| 10 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | +# GNU Affero General Public License for more details. |
| 13 | +# |
| 14 | +# You should have received a copy of the GNU Affero General Public License |
| 15 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | + |
| 17 | +# Generated by Django 5.2 on 2025-04-12 10:27 |
| 18 | + |
| 19 | +from django.db import migrations, models |
| 20 | + |
| 21 | + |
| 22 | +class Migration(migrations.Migration): |
| 23 | + dependencies = [ |
| 24 | + ( |
| 25 | + "users", |
| 26 | + "0008_remove_notification_users_notification_link_and_text_set_together_and_more", |
| 27 | + ), |
| 28 | + ] |
| 29 | + |
| 30 | + operations = [ |
| 31 | + migrations.RemoveConstraint( |
| 32 | + model_name="notification", |
| 33 | + name="users_notification_url_and_text_set_together", |
| 34 | + ), |
| 35 | + migrations.RenameField( |
| 36 | + model_name="notification", |
| 37 | + old_name="url", |
| 38 | + new_name="info_link", |
| 39 | + ), |
| 40 | + migrations.RenameField( |
| 41 | + model_name="notification", |
| 42 | + old_name="url_text", |
| 43 | + new_name="info_link_text", |
| 44 | + ), |
| 45 | + migrations.AddConstraint( |
| 46 | + model_name="notification", |
| 47 | + constraint=models.CheckConstraint( |
| 48 | + condition=models.Q( |
| 49 | + models.Q(("info_link__length", 0), ("info_link_text__length", 0)), |
| 50 | + models.Q(("info_link__length__gt", 0), ("info_link_text__length__gt", 0)), |
| 51 | + _connector="OR", |
| 52 | + ), |
| 53 | + name="users_notification_info_link_and_info_link_text_set_together", |
| 54 | + ), |
| 55 | + ), |
| 56 | + ] |
0 commit comments