Add deleteduser model

This commit is contained in:
PCoder 2019-05-06 08:07:26 +02:00
parent ba88bbf6bd
commit c40331fcc1
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2019-05-06 06:06
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('membership', '0008_change_user_id_to_customer_id_in_djangocms_blog'),
]
operations = [
migrations.CreateModel(
name='DeletedUser',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('user_id', models.PositiveIntegerField()),
('name', models.CharField(max_length=254)),
('email', models.EmailField(max_length=254, unique=True)),
('deleted_at', models.DateTimeField(auto_now_add=True)),
],
),
]

View File

@ -265,6 +265,15 @@ class CreditCards(models.Model):
pass
class DeletedUser(models.Model):
user_id = models.PositiveIntegerField()
# why 254 ? => to be consistent with legacy code
name = models.CharField(max_length=254)
email = models.EmailField(unique=True, max_length=254)
deleted_at = models.DateTimeField(auto_now_add=True)
class Calendar(models.Model):
datebooked = models.DateField()
user = models.ForeignKey(CustomUser)