12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- # -*- coding: utf-8 -*-
- from __future__ import unicode_literals
- from django.db import models, migrations
- from django.conf import settings
- class Migration(migrations.Migration):
- dependencies = [
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
- ]
- operations = [
- migrations.CreateModel(
- name='Comment',
- fields=[
- ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
- ('comment_text', models.CharField(default=b'none', max_length=160)),
- ('comment_datetime', models.DateTimeField(auto_now_add=True)),
- ],
- options={
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Posts',
- fields=[
- ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
- ('post_content', models.CharField(default=b'none', max_length=160)),
- ('date_time', models.DateTimeField(auto_now_add=True)),
- ('user', models.ForeignKey(default=b'none', to=settings.AUTH_USER_MODEL)),
- ],
- options={
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Profile',
- fields=[
- ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
- ('age', models.IntegerField(max_length=3, null=True, blank=True)),
- ('bio', models.CharField(max_length=430, blank=True)),
- ('picture_url', models.CharField(max_length=256, blank=True)),
- ('followusers', models.ManyToManyField(related_name='follow+', to=settings.AUTH_USER_MODEL)),
- ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL)),
- ],
- options={
- },
- bases=(models.Model,),
- ),
- migrations.AddField(
- model_name='comment',
- name='comment_by',
- field=models.ForeignKey(to='socialnetwork.Profile'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='comment',
- name='comment_post',
- field=models.ForeignKey(to='socialnetwork.Posts'),
- preserve_default=True,
- ),
- ]
|