-
Notifications
You must be signed in to change notification settings - Fork 36
/
0001_initial.py
39 lines (33 loc) · 1.27 KB
/
0001_initial.py
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
# Generated by Django 2.2.6 on 2019-10-02 18:35
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Customers',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=250)),
],
),
migrations.CreateModel(
name='Products',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=250)),
('price', models.DecimalField(decimal_places=2, max_digits=18)),
],
),
migrations.CreateModel(
name='Orders',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('subtotal', models.DecimalField(decimal_places=2, max_digits=18)),
('customer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='cockroach_example.Customers')),
('product', models.ManyToManyField(to='cockroach_example.Products')),
],
),
]