parent
870646daeb
commit
85a1982129
@ -1,19 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-03 11:40 |
||||
|
||||
from django.db import migrations, models |
||||
import django.db.models.deletion |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0001_initial'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AlterField( |
||||
model_name='apps', |
||||
name='has_combo', |
||||
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='combo_app_info', to='api.Apps', verbose_name='关联应用'), |
||||
), |
||||
] |
@ -0,0 +1,26 @@ |
||||
# Generated by Django 3.0.3 on 2020-05-03 11:20 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0001_initial'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AlterField( |
||||
model_name='appiosdeveloperinfo', |
||||
name='email', |
||||
field=models.EmailField(blank=True, max_length=64, null=True, verbose_name='email address'), |
||||
), |
||||
migrations.AlterUniqueTogether( |
||||
name='appiosdeveloperinfo', |
||||
unique_together={('user_id', 'email')}, |
||||
), |
||||
migrations.RemoveField( |
||||
model_name='appiosdeveloperinfo', |
||||
name='name', |
||||
), |
||||
] |
@ -0,0 +1,28 @@ |
||||
# Generated by Django 3.0.3 on 2020-05-03 21:16 |
||||
|
||||
from django.db import migrations, models |
||||
import django.db.models.deletion |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0002_auto_20200503_1120'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.CreateModel( |
||||
name='APPToDeveloper', |
||||
fields=[ |
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
('binary_file', models.CharField(blank=True, max_length=128, null=True, verbose_name='签名包名称')), |
||||
('updated_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')), |
||||
('app_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Apps', verbose_name='属于哪个APP')), |
||||
('developerid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.AppIOSDeveloperInfo', verbose_name='所使用苹果开发者账户')), |
||||
], |
||||
options={ |
||||
'verbose_name': '设备使用统计', |
||||
'verbose_name_plural': '设备使用统计', |
||||
}, |
||||
), |
||||
] |
@ -1,27 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-06 09:34 |
||||
|
||||
from django.db import migrations, models |
||||
import django.db.models.deletion |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0002_auto_20200303_1940'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AlterField( |
||||
model_name='appreleaseinfo', |
||||
name='app_id', |
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Apps', verbose_name='属于哪个APP'), |
||||
), |
||||
migrations.CreateModel( |
||||
name='AppStorage', |
||||
fields=[ |
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
('app_file', models.FileField(upload_to='')), |
||||
('name', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='api.AppReleaseInfo')), |
||||
], |
||||
), |
||||
] |
@ -1,27 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-06 15:31 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0003_auto_20200306_1734'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.RemoveField( |
||||
model_name='apps', |
||||
name='icon_url', |
||||
), |
||||
migrations.AddField( |
||||
model_name='appreleaseinfo', |
||||
name='icon_url', |
||||
field=models.CharField(blank=True, max_length=128, verbose_name='图标url'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='appreleaseinfo', |
||||
name='release_type', |
||||
field=models.SmallIntegerField(choices=[(0, 'android'), (1, 'adhoc'), (2, 'Inhouse'), (3, 'unknown')], default=0, verbose_name='版本类型'), |
||||
), |
||||
] |
@ -1,22 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-07 00:00 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0004_auto_20200306_2331'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.RemoveField( |
||||
model_name='apps', |
||||
name='name', |
||||
), |
||||
migrations.AddField( |
||||
model_name='appreleaseinfo', |
||||
name='name', |
||||
field=models.CharField(blank=True, max_length=32, null=True, verbose_name='应用名称'), |
||||
), |
||||
] |
@ -1,22 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-07 00:10 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0005_auto_20200307_0800'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.RemoveField( |
||||
model_name='appreleaseinfo', |
||||
name='name', |
||||
), |
||||
migrations.AddField( |
||||
model_name='apps', |
||||
name='name', |
||||
field=models.CharField(blank=True, max_length=32, null=True, verbose_name='应用名称'), |
||||
), |
||||
] |
@ -1,18 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-07 01:59 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0006_auto_20200307_0810'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='appreleaseinfo', |
||||
name='changelog', |
||||
field=models.TextField(blank=True, default=None, null=True, verbose_name='更新日志'), |
||||
), |
||||
] |
@ -1,23 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-07 04:49 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0007_appreleaseinfo_changelog'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='apps', |
||||
name='description', |
||||
field=models.TextField(blank=True, default=None, null=True, verbose_name='描述'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='apps', |
||||
name='type', |
||||
field=models.SmallIntegerField(choices=[(0, 'android'), (1, 'ios')], default=0, verbose_name='类型'), |
||||
), |
||||
] |
@ -1,26 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-09 06:24 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0008_auto_20200307_1249'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='userinfo', |
||||
name='domain_name', |
||||
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='域名'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='apps', |
||||
name='count_hits', |
||||
field=models.BigIntegerField(default=0, verbose_name='下载次数'), |
||||
), |
||||
migrations.DeleteModel( |
||||
name='AppStorage', |
||||
), |
||||
] |
@ -1,27 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-09 11:18 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0009_auto_20200309_1424'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.RemoveField( |
||||
model_name='userinfo', |
||||
name='head_img', |
||||
), |
||||
migrations.AlterField( |
||||
model_name='userinfo', |
||||
name='password', |
||||
field=models.CharField(max_length=128, verbose_name='password'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='userinfo', |
||||
name='qq', |
||||
field=models.BigIntegerField(blank=True, db_index=True, max_length=64, null=True, verbose_name='QQ'), |
||||
), |
||||
] |
@ -1,23 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-10 02:19 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0010_auto_20200309_1918'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='userinfo', |
||||
name='all_download_times', |
||||
field=models.IntegerField(default=0, verbose_name='总共下载次数'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='userinfo', |
||||
name='qq', |
||||
field=models.BigIntegerField(blank=True, db_index=True, null=True, verbose_name='QQ'), |
||||
), |
||||
] |
@ -1,18 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-14 07:22 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0011_auto_20200310_1019'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='userinfo', |
||||
name='head_img', |
||||
field=models.CharField(default='/static/frontend/head_portrait/logo@2x.png', max_length=256, verbose_name='个人头像'), |
||||
), |
||||
] |
@ -1,44 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-23 12:20 |
||||
|
||||
from django.conf import settings |
||||
from django.db import migrations, models |
||||
import django.db.models.deletion |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0012_userinfo_head_img'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AlterField( |
||||
model_name='appreleaseinfo', |
||||
name='is_master', |
||||
field=models.BooleanField(default=True, verbose_name='是否master版本'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='userinfo', |
||||
name='head_img', |
||||
field=models.CharField(default='/files/imgs/head_img.jpeg', max_length=256, verbose_name='个人头像'), |
||||
), |
||||
migrations.CreateModel( |
||||
name='AppStorage', |
||||
fields=[ |
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
('name', models.CharField(blank=True, max_length=64, null=True, verbose_name='存储名字')), |
||||
('storage_type', models.SmallIntegerField(choices=[(0, '本地存储'), (1, '七牛云存储'), (2, '阿里云存储'), (3, '默认存储')], default=3, verbose_name='存储类型')), |
||||
('access_key', models.CharField(blank=True, max_length=128, null=True, verbose_name='存储访问key')), |
||||
('secret_key', models.CharField(blank=True, max_length=128, null=True, verbose_name='存储访问secret')), |
||||
('bucket_name', models.CharField(blank=True, max_length=128, null=True, verbose_name='存储空间bucket_name')), |
||||
('additionalparameters', models.TextField(blank=True, help_text='阿里云:{"sts_role_arn":"arn信息","endpoint":""} 七牛云:{"domain_name":""}', max_length=256, null=True, verbose_name='额外参数')), |
||||
('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')), |
||||
('description', models.TextField(blank=True, default=None, null=True, verbose_name='备注')), |
||||
('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户ID')), |
||||
], |
||||
options={ |
||||
'verbose_name': '存储配置', |
||||
'verbose_name_plural': '存储配置', |
||||
}, |
||||
), |
||||
] |
@ -1,19 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-23 12:35 |
||||
|
||||
from django.db import migrations, models |
||||
import django.db.models.deletion |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0013_auto_20200323_2020'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='userinfo', |
||||
name='storage', |
||||
field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='app_storage', to='api.AppStorage', verbose_name='存储'), |
||||
), |
||||
] |
@ -1,28 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-26 06:54 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0014_userinfo_storage'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='userinfo', |
||||
name='history_release_limit', |
||||
field=models.IntegerField(blank=True, default=10, null=True, verbose_name='app 历史记录版本'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='userinfo', |
||||
name='all_download_times', |
||||
field=models.BigIntegerField(default=0, verbose_name='总共下载次数'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='userinfo', |
||||
name='head_img', |
||||
field=models.CharField(default='head_img.jpeg', max_length=256, verbose_name='个人头像'), |
||||
), |
||||
] |
@ -1,35 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-27 03:21 |
||||
|
||||
from django.conf import settings |
||||
from django.db import migrations, models |
||||
import django.db.models.deletion |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0015_auto_20200326_1454'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AlterField( |
||||
model_name='appstorage', |
||||
name='additionalparameters', |
||||
field=models.TextField(blank=True, help_text='阿里云:{"sts_role_arn":"arn信息","endpoint":""} 七牛云:{"domain_name":""} 本地存储:{"domain_name":""}', max_length=256, null=True, verbose_name='额外参数'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='token', |
||||
name='user', |
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='auth_token', to=settings.AUTH_USER_MODEL, verbose_name='关联用户'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='userinfo', |
||||
name='is_active', |
||||
field=models.BooleanField(default=True, verbose_name='账户状态,默认启用'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='userinfo', |
||||
name='storage', |
||||
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='app_storage', to='api.AppStorage', verbose_name='存储'), |
||||
), |
||||
] |
@ -1,28 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-03-31 07:43 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0016_auto_20200327_1121'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='appstorage', |
||||
name='domain_name', |
||||
field=models.CharField(blank=True, help_text='fly-storage.dvcloud.xin,可以自定义端口', max_length=128, null=True, verbose_name='下载域名'), |
||||
), |
||||
migrations.AddField( |
||||
model_name='appstorage', |
||||
name='is_https', |
||||
field=models.BooleanField(blank=True, default=True, null=True, verbose_name='是否支持https'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='appstorage', |
||||
name='additionalparameters', |
||||
field=models.TextField(blank=True, help_text='阿里云:{"sts_role_arn":"arn信息","endpoint":""} ', max_length=256, null=True, verbose_name='额外参数'), |
||||
), |
||||
] |
@ -1,28 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-07 03:34 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0017_auto_20200331_1543'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AlterField( |
||||
model_name='appreleaseinfo', |
||||
name='release_id', |
||||
field=models.CharField(db_index=True, max_length=64, unique=True, verbose_name='release 版本id'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='apps', |
||||
name='app_id', |
||||
field=models.CharField(db_index=True, max_length=64, unique=True), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='apps', |
||||
name='short', |
||||
field=models.CharField(db_index=True, max_length=16, unique=True, verbose_name='短链接'), |
||||
), |
||||
] |
@ -1,18 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-07 03:35 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0018_auto_20200407_1134'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AlterField( |
||||
model_name='userinfo', |
||||
name='uid', |
||||
field=models.CharField(db_index=True, max_length=64, unique=True), |
||||
), |
||||
] |
@ -1,21 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-07 03:57 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0019_auto_20200407_1135'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddIndex( |
||||
model_name='apps', |
||||
index=models.Index(fields=['app_id'], name='api_apps_app_id_4c0254_idx'), |
||||
), |
||||
migrations.AddIndex( |
||||
model_name='apps', |
||||
index=models.Index(fields=['id', 'user_id', 'type'], name='api_apps_id_226a6b_idx'), |
||||
), |
||||
] |
@ -1,28 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-10 11:41 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0020_auto_20200407_1157'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='apps', |
||||
name='password', |
||||
field=models.CharField(default='', help_text='默认 没有密码', max_length=32, verbose_name='访问密码'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='appreleaseinfo', |
||||
name='binary_url', |
||||
field=models.CharField(blank=True, max_length=128, verbose_name='第三方下载URL'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='token', |
||||
name='access_token', |
||||
field=models.CharField(max_length=64, unique=True), |
||||
), |
||||
] |
@ -1,18 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-10 17:15 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0021_auto_20200410_1141'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='apps', |
||||
name='isshow', |
||||
field=models.BigIntegerField(default=1, verbose_name='下载页可见'), |
||||
), |
||||
] |
@ -1,18 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-11 10:20 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0022_apps_isshow'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='appreleaseinfo', |
||||
name='udid', |
||||
field=models.TextField(blank=True, default=None, null=True, verbose_name='ios内测版 udid'), |
||||
), |
||||
] |
@ -1,28 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-13 15:57 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0023_appreleaseinfo_udid'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AlterField( |
||||
model_name='appreleaseinfo', |
||||
name='udid', |
||||
field=models.TextField(blank=True, default='', null=True, verbose_name='ios内测版 udid'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='appstorage', |
||||
name='additionalparameters', |
||||
field=models.TextField(blank=True, default=None, help_text='阿里云:{"sts_role_arn":"arn信息","endpoint":""} ', null=True, verbose_name='额外参数'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='appstorage', |
||||
name='is_https', |
||||
field=models.BooleanField(default=True, verbose_name='是否支持https'), |
||||
), |
||||
] |
@ -1,18 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-14 10:26 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0024_auto_20200413_1557'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='appstorage', |
||||
name='updated_time', |
||||
field=models.DateTimeField(auto_now=True, verbose_name='更新时间'), |
||||
), |
||||
] |
@ -1,18 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-14 15:05 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0025_appstorage_updated_time'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AlterField( |
||||
model_name='appstorage', |
||||
name='description', |
||||
field=models.TextField(blank=True, default='', null=True, verbose_name='备注'), |
||||
), |
||||
] |
@ -1,18 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-15 19:22 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0026_auto_20200414_1505'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='apps', |
||||
name='issupersign', |
||||
field=models.BigIntegerField(default=False, verbose_name='是否超级签名包'), |
||||
), |
||||
] |
@ -1,31 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-16 08:33 |
||||
|
||||
from django.db import migrations, models |
||||
import django.db.models.deletion |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0027_apps_issupersign'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.CreateModel( |
||||
name='AppUDID', |
||||
fields=[ |
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
('udid', models.CharField(db_index=True, max_length=64, unique=True, verbose_name='udid唯一标识')), |
||||
('product', models.CharField(db_index=True, max_length=64, verbose_name='产品')), |
||||
('serial', models.CharField(db_index=True, max_length=64, verbose_name='序列号')), |
||||
('version', models.CharField(db_index=True, max_length=64, verbose_name='型号')), |
||||
('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')), |
||||
('app_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Apps', verbose_name='属于哪个APP')), |
||||
], |
||||
options={ |
||||
'verbose_name': '应用详情', |
||||
'verbose_name_plural': '应用详情', |
||||
'unique_together': {('app_id', 'udid')}, |
||||
}, |
||||
), |
||||
] |
@ -1,38 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-16 09:15 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0028_appudid'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='appudid', |
||||
name='iccid', |
||||
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='型号'), |
||||
), |
||||
migrations.AddField( |
||||
model_name='appudid', |
||||
name='imei', |
||||
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='型号'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='appudid', |
||||
name='product', |
||||
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='产品'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='appudid', |
||||
name='serial', |
||||
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='序列号'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='appudid', |
||||
name='version', |
||||
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='型号'), |
||||
), |
||||
] |
@ -1,18 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-16 10:31 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0029_auto_20200416_0915'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='appudid', |
||||
name='updated_time', |
||||
field=models.DateTimeField(auto_now=True, verbose_name='更新时间'), |
||||
), |
||||
] |
@ -1,18 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-23 17:29 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0030_appudid_updated_time'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='appudid', |
||||
name='is_signed', |
||||
field=models.BooleanField(default=False, verbose_name='是否完成签名打包'), |
||||
), |
||||
] |
@ -1,49 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-25 15:30 |
||||
|
||||
from django.conf import settings |
||||
from django.db import migrations, models |
||||
import django.db.models.deletion |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0031_appudid_is_signed'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.CreateModel( |
||||
name='APPSuperSignUsedInfo', |
||||
fields=[ |
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')), |
||||
('updated_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')), |
||||
('app_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Apps', verbose_name='属于哪个APP')), |
||||
('udid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.AppUDID', verbose_name='所消耗的udid')), |
||||
('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户ID')), |
||||
], |
||||
options={ |
||||
'verbose_name': '设备使用统计', |
||||
'verbose_name_plural': '设备使用统计', |
||||
}, |
||||
), |
||||
migrations.CreateModel( |
||||
name='AppIOSDeveloperInfo', |
||||
fields=[ |
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
('name', models.CharField(max_length=64, unique=True, verbose_name='存储名字')), |
||||
('email', models.EmailField(blank=True, max_length=64, null=True, unique=True, verbose_name='email address')), |
||||
('password', models.CharField(max_length=64)), |
||||
('is_actived', models.BooleanField(default=False, verbose_name='是否已经激活')), |
||||
('usable_number', models.IntegerField(default=100, verbose_name='可使用设备数')), |
||||
('use_number', models.IntegerField(default=0, verbose_name='已消耗设备数')), |
||||
('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')), |
||||
('updated_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')), |
||||
('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户ID')), |
||||
], |
||||
options={ |
||||
'verbose_name': '苹果开发者账户', |
||||
'verbose_name_plural': '苹果开发者账户', |
||||
}, |
||||
), |
||||
] |
@ -1,23 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-25 16:01 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0032_appiosdeveloperinfo_appsupersignusedinfo'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='appudid', |
||||
name='binary_file', |
||||
field=models.CharField(blank=True, max_length=128, null=True, verbose_name='签名包名称'), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='appiosdeveloperinfo', |
||||
name='name', |
||||
field=models.CharField(max_length=64, unique=True, verbose_name='开发者标识'), |
||||
), |
||||
] |
@ -1,18 +0,0 @@ |
||||
# Generated by Django 3.0.3 on 2020-04-25 16:12 |
||||
|
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('api', '0033_auto_20200425_1601'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AddField( |
||||
model_name='appiosdeveloperinfo', |
||||
name='certid', |
||||
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='超级签名自动创建证书ID'), |
||||
), |
||||
] |
@ -0,0 +1,53 @@ |
||||
#!/usr/bin/env python |
||||
# -*- coding:utf-8 -*- |
||||
# project: 4月 |
||||
# author: liuyu |
||||
# date: 2020/4/7 |
||||
|
||||
from apscheduler.schedulers.background import BackgroundScheduler |
||||
from django_apscheduler.jobstores import DjangoJobStore, register_events, register_job |
||||
from fir_ser.settings import SYNC_CACHE_TO_DATABASE |
||||
from api.utils.crontab.sync_cache import sync_download_times |
||||
|
||||
# import atexit |
||||
# import fcntl |
||||
# |
||||
# # 主要是为了防止多进程出现的多个定时任务同时执行 |
||||
# f = open("scheduler.lock", "wb") |
||||
# try: |
||||
# fcntl.flock(f, fcntl.LOCK_EX | fcntl.LOCK_NB) |
||||
|
||||
# 开启定时工作 |
||||
try: |
||||
# 实例化调度器 |
||||
scheduler = BackgroundScheduler() |
||||
# 调度器使用DjangoJobStore() |
||||
scheduler.add_jobstore(DjangoJobStore(), "default") |
||||
|
||||
|
||||
# 设置定时任务,选择方式为interval,时间间隔为10s |
||||
# 另一种方式为每天固定时间执行任务,对应代码为: |
||||
# @register_job(scheduler, 'cron', day_of_week='mon-fri', hour='9', minute='30', second='10',id='task_time') |
||||
@register_job(scheduler, "interval", seconds=SYNC_CACHE_TO_DATABASE.get("download_times")) |
||||
def sync_download_times_job(): |
||||
# 这里写你要执行的任务 |
||||
sync_download_times() |
||||
|
||||
|
||||
register_events(scheduler) |
||||
scheduler.start() |
||||
except Exception as e: |
||||
print(e) |
||||
# 有错误就停止定时器 |
||||
scheduler.shutdown() |
||||
# |
||||
# except: |
||||
# pass |
||||
# |
||||
# |
||||
# def unlock(): |
||||
# fcntl.flock(f, fcntl.LOCK_UN) |
||||
# f.close() |
||||
# |
||||
# |
||||
# atexit.register(unlock) |
Loading…
Reference in new issue