<filename>master/migrations/0001_initial.py<gh_stars>1-10
# Generated by Django 2.2.7 on 2019-12-31 11:55

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Kategori',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nama', models.CharField(max_length=50)),
                ('keterangan', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Penerbit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nama', models.CharField(max_length=50)),
                ('telp', models.IntegerField(blank=True)),
                ('email', models.CharField(blank=True, max_length=100)),
                ('website', models.CharField(blank=True, max_length=100)),
                ('alamat', models.TextField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='Buku',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('kategori_khusus', models.CharField(blank=True, choices=[('Umum', 'Umum'), ('TKJ', 'Teknik Komputer dan Jaringan'), ('RPL', 'Rekayasa Perangkat Lunak'), ('TBSM', 'Teknik dan Bisnis Sepeda Motor')], max_length=4)),
                ('isbn', models.CharField(max_length=100)),
                ('tanggal', models.DateTimeField(auto_now_add=True)),
                ('kode_buku', models.CharField(max_length=40)),
                ('judul', models.CharField(max_length=80)),
                ('kelas', models.CharField(blank=True, choices=[('X', 'X (Sepuluh)'), ('XI', 'XI (Sebelas)'), ('XII', 'XII (Dua belas)')], max_length=15, null=True)),
                ('pegangan', models.CharField(blank=True, choices=[('Guru', 'Guru'), ('Siswa', 'Siswa'), ('Guru/Siswa', 'Guru/Siswa')], max_length=10, null=True)),
                ('penulis', models.CharField(max_length=80)),
                ('stok', models.IntegerField()),
                ('lokasi', models.CharField(blank=True, max_length=30)),
                ('keterangan', models.TextField(blank=True)),
                ('cover', models.ImageField(blank=True, upload_to='buku/cover/')),
                ('kategori', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='master.Kategori')),
                ('penerbit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='master.Penerbit')),
            ],
        ),
    ]

<filename>master/migrations/0001_initial.py<gh_stars>1-10
# Generated by Django 2.2.7 on 2019-12-31 11:55

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Kategori',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nama', models.CharField(max_length=50)),
                ('keterangan', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Penerbit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nama', models.CharField(max_length=50)),
                ('telp', models.IntegerField(blank=True)),
                ('email', models.CharField(blank=True, max_length=100)),
                ('website', models.CharField(blank=True, max_length=100)),
                ('alamat', models.TextField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='Buku',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('kategori_khusus', models.CharField(blank=True, choices=[('Umum', 'Umum'), ('TKJ', 'Teknik Komputer dan Jaringan'), ('RPL', 'Rekayasa Perangkat Lunak'), ('TBSM', 'Teknik dan Bisnis Sepeda Motor')], max_length=4)),
                ('isbn', models.CharField(max_length=100)),
                ('tanggal', models.DateTimeField(auto_now_add=True)),
                ('kode_buku', models.CharField(max_length=40)),
                ('judul', models.CharField(max_length=80)),
                ('kelas', models.CharField(blank=True, choices=[('X', 'X (Sepuluh)'), ('XI', 'XI (Sebelas)'), ('XII', 'XII (Dua belas)')], max_length=15, null=True)),
                ('pegangan', models.CharField(blank=True, choices=[('Guru', 'Guru'), ('Siswa', 'Siswa'), ('Guru/Siswa', 'Guru/Siswa')], max_length=10, null=True)),
                ('penulis', models.CharField(max_length=80)),
                ('stok', models.IntegerField()),
                ('lokasi', models.CharField(blank=True, max_length=30)),
                ('keterangan', models.TextField(blank=True)),
                ('cover', models.ImageField(blank=True, upload_to='buku/cover/')),
                ('kategori', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='master.Kategori')),
                ('penerbit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='master.Penerbit')),
            ],
        ),
    ]

# Generated by Django 2.2.7 on 2019-12-31 11:55