You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
myblog/App/migrations/0010_comment_paper.py

37 lines
1.4 KiB

3 years ago
# Generated by Django 3.2.9 on 2022-05-03 08:30
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('App', '0009_alter_upload_file_size'),
]
operations = [
migrations.CreateModel(
name='paper',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('username', models.CharField(max_length=100)),
('paper_time', models.DateTimeField(auto_now_add=True)),
('paper_title', models.CharField(max_length=100)),
('paper_desc', models.CharField(max_length=100)),
('paper_content', models.CharField(max_length=10000)),
('thumbs_up', models.IntegerField(default=0)),
],
),
migrations.CreateModel(
name='comment',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('username', models.CharField(max_length=100)),
('comment_time', models.DateTimeField(auto_now_add=True)),
('comment_content', models.CharField(max_length=100)),
('paper_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.paper')),
],
),
]