mirror of
https://github.com/chibicitiberiu/ytsm.git
synced 2024-02-24 05:43:31 +00:00
[WIP] Support for MySQL database
This commit is contained in:
parent
cb7e1d1be5
commit
eb97134415
@ -18,28 +18,28 @@ class Migration(migrations.Migration):
|
|||||||
name='Channel',
|
name='Channel',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('channel_id', models.TextField(unique=True)),
|
('channel_id', models.CharField(unique=True, max_length=255)),
|
||||||
('username', models.TextField(null=True, unique=True)),
|
('username', models.CharField(null=True, unique=True, max_length=255)),
|
||||||
('custom_url', models.TextField(null=True, unique=True)),
|
('custom_url', models.CharField(null=True, unique=True, max_length=255)),
|
||||||
('name', models.TextField()),
|
('name', models.CharField(max_length=255)),
|
||||||
('description', models.TextField()),
|
('description', models.TextField()),
|
||||||
('icon_default', models.TextField()),
|
('icon_default', models.TextField()),
|
||||||
('icon_best', models.TextField()),
|
('icon_best', models.TextField()),
|
||||||
('upload_playlist_id', models.TextField()),
|
('upload_playlist_id', models.CharField(max_length=255)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Subscription',
|
name='Subscription',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('name', models.TextField()),
|
('name', models.CharField(max_length=255)),
|
||||||
('playlist_id', models.TextField(unique=True)),
|
('playlist_id', models.CharField(unique=True, max_length=255)),
|
||||||
('description', models.TextField()),
|
('description', models.TextField()),
|
||||||
('icon_default', models.TextField()),
|
('icon_default', models.TextField()),
|
||||||
('icon_best', models.TextField()),
|
('icon_best', models.TextField()),
|
||||||
('auto_download', models.BooleanField(null=True)),
|
('auto_download', models.BooleanField(null=True)),
|
||||||
('download_limit', models.IntegerField(null=True)),
|
('download_limit', models.IntegerField(null=True)),
|
||||||
('download_order', models.TextField(null=True)),
|
('download_order', models.CharField(null=True, max_length=255)),
|
||||||
('manager_delete_after_watched', models.BooleanField(null=True)),
|
('manager_delete_after_watched', models.BooleanField(null=True)),
|
||||||
('channel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.Channel')),
|
('channel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.Channel')),
|
||||||
],
|
],
|
||||||
@ -48,7 +48,7 @@ class Migration(migrations.Migration):
|
|||||||
name='SubscriptionFolder',
|
name='SubscriptionFolder',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('name', models.TextField()),
|
('name', models.CharField(max_length=255)),
|
||||||
('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.SubscriptionFolder')),
|
('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.SubscriptionFolder')),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -61,15 +61,15 @@ class Migration(migrations.Migration):
|
|||||||
('auto_download', models.BooleanField(null=True)),
|
('auto_download', models.BooleanField(null=True)),
|
||||||
('download_global_limit', models.IntegerField(null=True)),
|
('download_global_limit', models.IntegerField(null=True)),
|
||||||
('download_subscription_limit', models.IntegerField(null=True)),
|
('download_subscription_limit', models.IntegerField(null=True)),
|
||||||
('download_order', models.TextField(null=True)),
|
('download_order', models.CharField(null=True, max_length=255)),
|
||||||
('download_path', models.TextField(null=True)),
|
('download_path', models.TextField(null=True)),
|
||||||
('download_file_pattern', models.TextField(null=True)),
|
('download_file_pattern', models.CharField(null=True, max_length=255)),
|
||||||
('download_format', models.TextField(null=True)),
|
('download_format', models.CharField(null=True, max_length=255)),
|
||||||
('download_subtitles', models.BooleanField(null=True)),
|
('download_subtitles', models.BooleanField(null=True)),
|
||||||
('download_autogenerated_subtitles', models.BooleanField(null=True)),
|
('download_autogenerated_subtitles', models.BooleanField(null=True)),
|
||||||
('download_subtitles_all', models.BooleanField(null=True)),
|
('download_subtitles_all', models.BooleanField(null=True)),
|
||||||
('download_subtitles_langs', models.TextField(null=True)),
|
('download_subtitles_langs', models.CharField(null=True, max_length=255)),
|
||||||
('download_subtitles_format', models.TextField(null=True)),
|
('download_subtitles_format', models.CharField(null=True, max_length=255)),
|
||||||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -77,8 +77,8 @@ class Migration(migrations.Migration):
|
|||||||
name='Video',
|
name='Video',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('video_id', models.TextField()),
|
('video_id', models.CharField(max_length=12)),
|
||||||
('name', models.TextField()),
|
('name', models.CharField(max_length=255)),
|
||||||
('description', models.TextField()),
|
('description', models.TextField()),
|
||||||
('watched', models.BooleanField(default=False)),
|
('watched', models.BooleanField(default=False)),
|
||||||
('downloaded_path', models.TextField(blank=True, null=True)),
|
('downloaded_path', models.TextField(blank=True, null=True)),
|
||||||
|
@ -18,7 +18,7 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='video',
|
model_name='video',
|
||||||
name='uploader_name',
|
name='uploader_name',
|
||||||
field=models.TextField(default=None),
|
field=models.CharField(default=None, max_length=255),
|
||||||
preserve_default=False,
|
preserve_default=False,
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
|
@ -164,7 +164,7 @@ class Subscription(models.Model):
|
|||||||
|
|
||||||
|
|
||||||
class Video(models.Model):
|
class Video(models.Model):
|
||||||
video_id = models.TextField(null=False)
|
video_id = models.CharField(null=False, max_length=12)
|
||||||
name = models.TextField(null=False)
|
name = models.TextField(null=False)
|
||||||
description = models.TextField()
|
description = models.TextField()
|
||||||
watched = models.BooleanField(default=False, null=False)
|
watched = models.BooleanField(default=False, null=False)
|
||||||
@ -174,7 +174,7 @@ class Video(models.Model):
|
|||||||
playlist_index = models.IntegerField(null=False)
|
playlist_index = models.IntegerField(null=False)
|
||||||
publish_date = models.DateTimeField(null=False)
|
publish_date = models.DateTimeField(null=False)
|
||||||
thumbnail = models.TextField()
|
thumbnail = models.TextField()
|
||||||
uploader_name = models.TextField(null=False)
|
uploader_name = models.CharField(null=False, max_length=255)
|
||||||
views = models.IntegerField(null=False, default=0)
|
views = models.IntegerField(null=False, default=0)
|
||||||
rating = models.FloatField(null=False, default=0.5)
|
rating = models.FloatField(null=False, default=0.5)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user