core/migrations/0002_comment_postgcp.py (30 lines of code) (raw):

# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Generated by Django 4.0.5 on 2022-07-07 21:08 import datetime from django.db import migrations, models import uuid class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.CreateModel( name='Comment', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('post_id', models.CharField(max_length=500)), ('username', models.CharField(max_length=100)), ('comment', models.TextField()), ('created_at', models.DateTimeField(default=datetime.datetime.now)), ], ), migrations.CreateModel( name='PostGCP', fields=[ ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)), ('user', models.CharField(max_length=100)), ('image', models.TextField()), ('caption', models.TextField()), ('created_at', models.DateTimeField(default=datetime.datetime.now)), ('no_of_likes', models.IntegerField(default=0)), ], ), ]