Browse Source

add version field in password profile model

pull/342/head
Guillaume Vincent 8 years ago
parent
commit
198513bf68
2 changed files with 23 additions and 0 deletions
  1. +20
    -0
      api/migrations/0005_password_version.py
  2. +3
    -0
      api/models.py

+ 20
- 0
api/migrations/0005_password_version.py View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-21 13:30
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('api', '0004_remove_entries_password_info_models'),
]

operations = [
migrations.AddField(
model_name='password',
name='version',
field=models.IntegerField(default=1),
),
]

+ 3
- 0
api/models.py View File

@@ -83,5 +83,8 @@ class Password(DateMixin):
length = models.IntegerField(default=12) length = models.IntegerField(default=12)
counter = models.IntegerField(default=1) counter = models.IntegerField(default=1)


version = models.IntegerField(default=1)

def __str__(self): def __str__(self):
return str(self.id) return str(self.id)


Loading…
Cancel
Save