mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
models: New model to store module setup versions
This commit is contained in:
2 files changed
+28
No files matched your search
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.2 on 2016-02-10 12:30
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('plinth', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Module',
|
||||
fields=[
|
||||
('name', models.TextField(primary_key=True, serialize=False)),
|
||||
('setup_version', models.IntegerField()),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -37,3 +37,9 @@ class KVStore(models.Model):
|
||||
def value(self, val):
|
||||
"""Store the value of the key/value pair by JSON encoding it"""
|
||||
self.value_json = json.dumps(val)
|
||||
|
||||
|
||||
class Module(models.Model):
|
||||
"""Model to store current setup versions of a module."""
|
||||
name = models.TextField(primary_key=True)
|
||||
setup_version = models.IntegerField()
|
||||
Reference in new issue
Block a user