45 lines
1.7 KiB
Python
45 lines
1.7 KiB
Python
# Generated by Django 2.2.3 on 2019-07-27 15:16
|
|
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import uuid
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='SharedPassword',
|
|
fields=[
|
|
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
|
('name', models.CharField(max_length=512)),
|
|
('url', models.CharField(blank=True, max_length=512)),
|
|
('description', models.TextField(blank=True)),
|
|
('iv', models.BinaryField(max_length=16)),
|
|
('encrypted_password', models.BinaryField(max_length=2048)),
|
|
],
|
|
options={
|
|
'verbose_name': 'shared_password',
|
|
'verbose_name_plural': 'shared_passwords',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='SharedPasswordAccess',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('password', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pwdb.SharedPassword')),
|
|
('user', models.ForeignKey(limit_choices_to={'is_staff': True}, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
options={
|
|
'verbose_name': 'shared_password_access',
|
|
'verbose_name_plural': 'shared_passwords_access',
|
|
},
|
|
),
|
|
]
|