Go back to sqlite

This commit is contained in:
Joakim Hellsén 2025-08-07 01:01:46 +02:00
commit f84b59cb4f
10 changed files with 27 additions and 173 deletions

View file

@ -1,6 +1,7 @@
# Generated by Django 5.2.4 on 2025-07-23 23:51
# Generated by Django 5.2.4 on 2025-08-06 04:12
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
@ -9,6 +10,7 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
@ -21,7 +23,7 @@ class Migration(migrations.Migration):
('created_at', models.DateTimeField(db_index=True)),
('entitlement_limit', models.PositiveIntegerField(default=1)),
('is_ios_available', models.BooleanField(default=False)),
('distribution_type', models.TextField(choices=[('DIRECT_ENTITLEMENT', 'Direct Entitlement'), ('CODE', 'Code')], db_index=True)),
('distribution_type', models.TextField(db_index=True)),
],
),
migrations.CreateModel(
@ -38,6 +40,7 @@ class Migration(migrations.Migration):
('id', models.TextField(primary_key=True, serialize=False)),
('slug', models.TextField(blank=True, db_index=True, default='')),
('display_name', models.TextField(db_index=True)),
('box_art', models.URLField(blank=True, default='', max_length=500)),
],
options={
'indexes': [models.Index(fields=['slug'], name='twitch_game_slug_a02d3c_idx'), models.Index(fields=['display_name'], name='twitch_game_display_a35ba3_idx')],
@ -99,6 +102,20 @@ class Migration(migrations.Migration):
name='drop',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='twitch.timebaseddrop'),
),
migrations.CreateModel(
name='NotificationSubscription',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('notify_found', models.BooleanField(default=False)),
('notify_live', models.BooleanField(default=False)),
('game', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='twitch.game')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='twitch.organization')),
],
options={
'unique_together': {('user', 'game'), ('user', 'organization')},
},
),
migrations.AddIndex(
model_name='dropcampaign',
index=models.Index(fields=['name'], name='twitch_drop_name_3b70b3_idx'),

View file

@ -1,29 +0,0 @@
# Generated by Django 5.2.4 on 2025-08-02 02:08
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('twitch', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='NotificationSubscription',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('notify_found', models.BooleanField(default=False)),
('notify_live', models.BooleanField(default=False)),
('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='twitch.game')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'unique_together': {('user', 'game')},
},
),
]

View file

@ -1,34 +0,0 @@
# Generated by Django 5.2.4 on 2025-08-02 03:39
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('twitch', '0002_notificationsubscription'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.AlterUniqueTogether(
name='notificationsubscription',
unique_together={('user', 'game')},
),
migrations.AddField(
model_name='notificationsubscription',
name='organization',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='twitch.organization'),
),
migrations.AlterField(
model_name='notificationsubscription',
name='game',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='twitch.game'),
),
migrations.AlterUniqueTogether(
name='notificationsubscription',
unique_together={('user', 'game'), ('user', 'organization')},
),
]

View file

@ -1,18 +0,0 @@
# Generated by Django 5.2.4 on 2025-08-03 22:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('twitch', '0003_alter_notificationsubscription_unique_together_and_more'),
]
operations = [
migrations.AlterField(
model_name='dropbenefit',
name='distribution_type',
field=models.TextField(db_index=True),
),
]

View file

@ -1,18 +0,0 @@
# Generated by Django 5.2.4 on 2025-08-04 03:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('twitch', '0004_alter_dropbenefit_distribution_type'),
]
operations = [
migrations.AddField(
model_name='game',
name='box_art',
field=models.URLField(blank=True, default='', max_length=500),
),
]