瀏覽代碼

add version field in password profile model

pull/342/head
Guillaume Vincent 8 年之前
父節點
當前提交
198513bf68
共有 2 個文件被更改,包括 23 次插入0 次删除
  1. +20
    -0
      api/migrations/0005_password_version.py
  2. +3
    -0
      api/models.py

+ 20
- 0
api/migrations/0005_password_version.py 查看文件

@@ -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 查看文件

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

version = models.IntegerField(default=1)

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


Loading…
取消
儲存