update data model
This commit is contained in:
		@@ -1,9 +1,8 @@
 | 
			
		||||
# -*- coding: utf-8 -*-
 | 
			
		||||
# Generated by Django 1.10.4 on 2017-01-03 18:28
 | 
			
		||||
# Generated by Django 1.10.5 on 2017-02-01 10:50
 | 
			
		||||
from __future__ import unicode_literals
 | 
			
		||||
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
import django.db.models.deletion
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
@@ -15,30 +14,15 @@ class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.CreateModel(
 | 
			
		||||
            name='Client',
 | 
			
		||||
            fields=[
 | 
			
		||||
                ('id', models.UUIDField(editable=False, primary_key=True, serialize=False)),
 | 
			
		||||
            ],
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.CreateModel(
 | 
			
		||||
            name='Location',
 | 
			
		||||
            name='LocationData',
 | 
			
		||||
            fields=[
 | 
			
		||||
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
 | 
			
		||||
                ('name', models.CharField(max_length=30, unique=True)),
 | 
			
		||||
                ('location_id', models.CharField(max_length=32)),
 | 
			
		||||
                ('table_no', models.IntegerField()),
 | 
			
		||||
                ('tst', models.DateTimeField()),
 | 
			
		||||
                ('on_off', models.BooleanField()),
 | 
			
		||||
                ('processed', models.BooleanField(default=False)),
 | 
			
		||||
                ('error_msg', models.CharField(blank=True, max_length=16000, null=True)),
 | 
			
		||||
            ],
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.CreateModel(
 | 
			
		||||
            name='Table',
 | 
			
		||||
            fields=[
 | 
			
		||||
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
 | 
			
		||||
                ('number', models.IntegerField()),
 | 
			
		||||
                ('name', models.CharField(max_length=30)),
 | 
			
		||||
                ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='billard.Client')),
 | 
			
		||||
            ],
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='client',
 | 
			
		||||
            name='location',
 | 
			
		||||
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='billard.Location'),
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										29
									
								
								billard/migrations/0002_location.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								billard/migrations/0002_location.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
# -*- coding: utf-8 -*-
 | 
			
		||||
# Generated by Django 1.10.5 on 2017-02-01 12:43
 | 
			
		||||
from __future__ import unicode_literals
 | 
			
		||||
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ('billard', '0001_initial'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.CreateModel(
 | 
			
		||||
            name='Location',
 | 
			
		||||
            fields=[
 | 
			
		||||
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
 | 
			
		||||
                ('code', models.CharField(max_length=16, unique=True)),
 | 
			
		||||
                ('name', models.CharField(max_length=64, unique=True)),
 | 
			
		||||
                ('street', models.CharField(blank=True, max_length=64, null=True)),
 | 
			
		||||
                ('plz', models.CharField(blank=True, max_length=8, null=True)),
 | 
			
		||||
                ('city', models.CharField(blank=True, max_length=64, null=True)),
 | 
			
		||||
                ('phone', models.CharField(blank=True, max_length=64, null=True)),
 | 
			
		||||
                ('email', models.EmailField(blank=True, max_length=254, null=True)),
 | 
			
		||||
                ('url', models.URLField(blank=True, null=True)),
 | 
			
		||||
            ],
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
@@ -1,25 +0,0 @@
 | 
			
		||||
# -*- coding: utf-8 -*-
 | 
			
		||||
# Generated by Django 1.10.5 on 2017-01-06 19:24
 | 
			
		||||
from __future__ import unicode_literals
 | 
			
		||||
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ('billard', '0001_initial'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.CreateModel(
 | 
			
		||||
            name='LocationData',
 | 
			
		||||
            fields=[
 | 
			
		||||
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
 | 
			
		||||
                ('location_id', models.CharField(max_length=32)),
 | 
			
		||||
                ('table_no', models.IntegerField()),
 | 
			
		||||
                ('tst', models.DateTimeField()),
 | 
			
		||||
                ('on_off', models.BooleanField()),
 | 
			
		||||
            ],
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
@@ -1,25 +0,0 @@
 | 
			
		||||
# -*- coding: utf-8 -*-
 | 
			
		||||
# Generated by Django 1.10.5 on 2017-01-09 14:09
 | 
			
		||||
from __future__ import unicode_literals
 | 
			
		||||
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ('billard', '0002_locationdata'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='locationdata',
 | 
			
		||||
            name='error_msg',
 | 
			
		||||
            field=models.CharField(blank=True, max_length=16000, null=True),
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='locationdata',
 | 
			
		||||
            name='processed',
 | 
			
		||||
            field=models.BooleanField(default=False),
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
							
								
								
									
										31
									
								
								billard/migrations/0003_client.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								billard/migrations/0003_client.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
			
		||||
# -*- coding: utf-8 -*-
 | 
			
		||||
# Generated by Django 1.10.5 on 2017-02-01 12:48
 | 
			
		||||
from __future__ import unicode_literals
 | 
			
		||||
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
import django.db.models.deletion
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ('billard', '0002_location'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.CreateModel(
 | 
			
		||||
            name='Client',
 | 
			
		||||
            fields=[
 | 
			
		||||
                ('id', models.UUIDField(editable=False, primary_key=True, serialize=False)),
 | 
			
		||||
                ('desk1_enable', models.BooleanField()),
 | 
			
		||||
                ('desk1_name', models.CharField(blank=True, max_length=32, null=True)),
 | 
			
		||||
                ('desk1_prize_nt', models.DecimalField(blank=True, decimal_places=2, max_digits=4, null=True)),
 | 
			
		||||
                ('desk1_prize_ht', models.DecimalField(blank=True, decimal_places=2, max_digits=4, null=True)),
 | 
			
		||||
                ('desk2_enable', models.BooleanField()),
 | 
			
		||||
                ('desk2_name', models.CharField(blank=True, max_length=32, null=True)),
 | 
			
		||||
                ('desk2_prize_nt', models.DecimalField(blank=True, decimal_places=2, max_digits=4, null=True)),
 | 
			
		||||
                ('desk2_prize_ht', models.DecimalField(blank=True, decimal_places=2, max_digits=4, null=True)),
 | 
			
		||||
                ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='billard.Location')),
 | 
			
		||||
            ],
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
		Reference in New Issue
	
	Block a user