1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# Generated by Django 4.2.22 on 2025-07-02 12:01
import django.core.files.storage
from django.db import migrations, models
import django.db.models.deletion
import simulationAPI.models
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Session',
fields=[
('session_id', models.CharField(editable=False, max_length=40, primary_key=True, serialize=False)),
('app_name', models.CharField(default='', max_length=40)),
('created_at', models.DateTimeField(auto_now_add=True)),
('expire_at', models.DateTimeField(default=simulationAPI.models.get_expire_at)),
('count', models.IntegerField(default=0)),
],
),
migrations.CreateModel(
name='Task',
fields=[
('task_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('file', models.FileField(storage=django.core.files.storage.FileSystemStorage(location='/home/sunil/git/xcosblocks/blocks/file_storage'), upload_to='')),
('type', models.CharField(choices=[('XCOS', 'Xcos'), ('SCRIPT', 'Scilab Script')], default='XCOS', max_length=20)),
('status', models.CharField(choices=[('PENDING', 'Pending'), ('STARTED', 'Started'), ('STREAMING', 'Streaming'), ('SUCCESS', 'Success'), ('FAILURE', 'Failure'), ('RETRY', 'Retry'), ('CANCELED', 'Canceled')], default='PENDING', max_length=20)),
('parameters', models.TextField(blank=True, null=True)),
('upload_time', models.DateTimeField(auto_now=True)),
('log_name', models.CharField(blank=True, max_length=500, null=True)),
('script_task_id', models.CharField(blank=True, max_length=40, null=True)),
('workspace_file', models.CharField(blank=True, max_length=500, null=True)),
('returncode', models.IntegerField(blank=True, null=True)),
('start_time', models.DateTimeField(null=True)),
('end_time', models.DateTimeField(null=True)),
('session', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='task', to='simulationAPI.session')),
],
),
]
|