<gh_stars>0
# Generated by Django 3.2.9 on 2021-12-13 20:46

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Note',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subject', models.CharField(max_length=255)),
                ('content', models.TextField()),
                ('private', models.BooleanField(default=False)),
                ('code', models.TextField(blank=True)),
                ('upvote', models.IntegerField(default=0)),
                ('resourceLink', models.CharField(blank=True, max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Stack',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stackName', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('firstName', models.CharField(max_length=45)),
                ('lastName', models.CharField(max_length=45)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('username', models.CharField(max_length=45, unique=True)),
                ('level', models.IntegerField(default=0)),
                ('password', models.CharField(max_length=45)),
                ('userCreatedAt', models.DateTimeField(auto_now_add=True)),
                ('userUpdatedAt', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Upload',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uploadName', models.CharField(blank=True, max_length=255)),
                ('upload', models.FileField(default='bee.jpg', upload_to='docs')),
                ('note', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='notesApp.note')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('discord', models.CharField(blank=True, max_length=255)),
                ('image', models.ImageField(default='bee.jpg', upload_to='profileImgs')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='notesApp.user')),
            ],
        ),
        migrations.AddField(
            model_name='note',
            name='author',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='noteUser', to='notesApp.user'),
        ),
        migrations.AddField(
            model_name='note',
            name='stack',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='noteStack', to='notesApp.stack'),
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.TextField()),
                ('commentCode', models.TextField(blank=True)),
                ('like', models.IntegerField()),
                ('resourceUrl', models.CharField(blank=True, max_length=255)),
                ('commentCreatedAt', models.DateTimeField(auto_now_add=True)),
                ('commentUpdatedAt', models.DateTimeField(auto_now=True)),
                ('commenter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='commentUser', to='notesApp.user')),
                ('note', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='commentNote', to='notesApp.note')),
            ],
        ),
    ]

# Generated by Django 3.2.9 on 2021-12-13 20:46

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Note',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subject', models.CharField(max_length=255)),
                ('content', models.TextField()),
                ('private', models.BooleanField(default=False)),
                ('code', models.TextField(blank=True)),
                ('upvote', models.IntegerField(default=0)),
                ('resourceLink', models.CharField(blank=True, max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Stack',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stackName', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('firstName', models.CharField(max_length=45)),
                ('lastName', models.CharField(max_length=45)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('username', models.CharField(max_length=45, unique=True)),
                ('level', models.IntegerField(default=0)),
                ('password', models.CharField(max_length=45)),
                ('userCreatedAt', models.DateTimeField(auto_now_add=True)),
                ('userUpdatedAt', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Upload',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uploadName', models.CharField(blank=True, max_length=255)),
                ('upload', models.FileField(default='bee.jpg', upload_to='docs')),
                ('note', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='notesApp.note')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('discord', models.CharField(blank=True, max_length=255)),
                ('image', models.ImageField(default='bee.jpg', upload_to='profileImgs')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='notesApp.user')),
            ],
        ),
        migrations.AddField(
            model_name='note',
            name='author',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='noteUser', to='notesApp.user'),
        ),
        migrations.AddField(
            model_name='note',
            name='stack',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='noteStack', to='notesApp.stack'),
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.TextField()),
                ('commentCode', models.TextField(blank=True)),
                ('like', models.IntegerField()),
                ('resourceUrl', models.CharField(blank=True, max_length=255)),
                ('commentCreatedAt', models.DateTimeField(auto_now_add=True)),
                ('commentUpdatedAt', models.DateTimeField(auto_now=True)),
                ('commenter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='commentUser', to='notesApp.user')),
                ('note', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='commentNote', to='notesApp.note')),
            ],
        ),
    ]
# Generated by Django 3.2.9 on 2021-12-13 20:46