12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- # Generated by Django 3.2.5 on 2021-10-04 05:49
- from django.conf import settings
- from django.db import migrations, models
- import django.db.models.deletion
- class Migration(migrations.Migration):
- initial = True
- dependencies = [
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
- ]
- operations = [
- migrations.CreateModel(
- name='ArticleClass',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('Name', models.CharField(max_length=50)),
- ],
- ),
- migrations.CreateModel(
- name='Tag',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('Name', models.CharField(max_length=50)),
- ],
- ),
- migrations.CreateModel(
- name='Article',
- fields=[
- ('ArticleId', models.AutoField(primary_key=True, serialize=False)),
- ('Title', models.CharField(max_length=50)),
- ('Content', models.TextField()),
- ('Read', models.IntegerField()),
- ('Like', models.IntegerField()),
- ('Publish_Time', models.DateTimeField(auto_now_add=True)),
- ('Edit_Time', models.DateTimeField(auto_now=True)),
- ('Class', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Article.articleclass')),
- ('Publisher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Poster', to=settings.AUTH_USER_MODEL)),
- ('Tag', models.ManyToManyField(to='Article.Tag')),
- ],
- ),
- ]
|