Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Commit

Permalink
Merge pull request #2 from joeyorlando/joeyorlando/update-user-model
Browse files Browse the repository at this point in the history
fix migrations
  • Loading branch information
joeyorlando authored Dec 13, 2022
2 parents a892ed5 + 0530c6d commit d700499
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 18 deletions.
9 changes: 3 additions & 6 deletions push_notifications/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# -*- coding: utf-8 -*-
from django.conf import settings
from django.db import migrations, models

import push_notifications.fields

from ..settings import PUSH_NOTIFICATIONS_SETTINGS as SETTINGS

class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.PUSH_NOTIFICATION_SETTINGS),
]
class Migration(migrations.Migration):

USER_MODEL = settings.PUSH_NOTIFICATION_SETTINGS["USER_MODEL"]
USER_MODEL = SETTINGS["USER_MODEL"]

operations = [
migrations.CreateModel(
Expand Down
8 changes: 3 additions & 5 deletions push_notifications/migrations/0003_wnsdevice.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-13 20:46
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models

from ..settings import PUSH_NOTIFICATIONS_SETTINGS as SETTINGS


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.PUSH_NOTIFICATION_SETTINGS),
('push_notifications', '0002_auto_20160106_0850'),
]

USER_MODEL = settings.PUSH_NOTIFICATION_SETTINGS["USER_MODEL"]

operations = [
migrations.CreateModel(
name='WNSDevice',
Expand All @@ -24,7 +22,7 @@ class Migration(migrations.Migration):
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Creation date')),
('device_id', models.UUIDField(blank=True, db_index=True, help_text='GUID()', null=True, verbose_name='Device ID')),
('registration_id', models.TextField(verbose_name='Notification URI')),
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=USER_MODEL)),
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=SETTINGS["USER_MODEL"])),
],
options={
'verbose_name': 'WNS device',
Expand Down
2 changes: 0 additions & 2 deletions push_notifications/migrations/0004_fcm.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-13 20:46
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.PUSH_NOTIFICATION_SETTINGS),
('push_notifications', '0003_wnsdevice'),
]

Expand Down
8 changes: 3 additions & 5 deletions push_notifications/migrations/0006_webpushdevice.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
# -*- coding: utf-8 -*-
from django.conf import settings
from django.db import migrations, models

from ..settings import PUSH_NOTIFICATIONS_SETTINGS as SETTINGS


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.PUSH_NOTIFICATION_SETTINGS),
('push_notifications', '0005_applicationid'),
]

USER_MODEL = settings.PUSH_NOTIFICATION_SETTINGS["USER_MODEL"]

operations = [
migrations.CreateModel(
name='WebPushDevice',
Expand All @@ -25,7 +23,7 @@ class Migration(migrations.Migration):
('p256dh', models.CharField(max_length=88, verbose_name='User public encryption key')),
('auth', models.CharField(max_length=24, verbose_name='User auth secret')),
('browser', models.CharField(default='CHROME', help_text='Currently only support to Chrome, Firefox and Opera browsers', max_length=10, verbose_name='Browser', choices=[('CHROME', 'Chrome'), ('FIREFOX', 'Firefox'), ('OPERA', 'Opera')])),
('user', models.ForeignKey(blank=True, to=USER_MODEL, null=True, on_delete=models.CASCADE)),
('user', models.ForeignKey(blank=True, to=SETTINGS["USER_MODEL"], null=True, on_delete=models.CASCADE)),
],
options={
'verbose_name': 'WebPush device',
Expand Down

0 comments on commit d700499

Please sign in to comment.