Commit a979a15f638925a114d55b2eb0ef18a25138e792

Authored by Macartur Sousa
1 parent ff3d2da6

Added model to store last update from plugins

Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
Signed-off-by: Simião Carvalho <simiaosimis@gmail.com>
colab/plugins/migrations/0001_initial.py 0 → 100644
... ... @@ -0,0 +1,24 @@
  1 +# -*- coding: utf-8 -*-
  2 +from __future__ import unicode_literals
  3 +
  4 +from django.db import models, migrations
  5 +
  6 +
  7 +class Migration(migrations.Migration):
  8 +
  9 + dependencies = [
  10 + ]
  11 +
  12 + operations = [
  13 + migrations.CreateModel(
  14 + name='TimeStampPlugin',
  15 + fields=[
  16 + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
  17 + ('name', models.CharField(max_length=255)),
  18 + ('timestamp', models.DateTimeField(blank=True)),
  19 + ],
  20 + options={
  21 + },
  22 + bases=(models.Model,),
  23 + ),
  24 + ]
... ...
colab/plugins/migrations/0002_auto_20151028_1730.py 0 → 100644
... ... @@ -0,0 +1,26 @@
  1 +# -*- coding: utf-8 -*-
  2 +from __future__ import unicode_literals
  3 +
  4 +from django.db import models, migrations
  5 +
  6 +
  7 +class Migration(migrations.Migration):
  8 +
  9 + dependencies = [
  10 + ('plugins', '0001_initial'),
  11 + ]
  12 +
  13 + operations = [
  14 + migrations.AlterField(
  15 + model_name='timestampplugin',
  16 + name='id',
  17 + field=models.IntegerField(serialize=False, primary_key=True),
  18 + preserve_default=True,
  19 + ),
  20 + migrations.AlterField(
  21 + model_name='timestampplugin',
  22 + name='name',
  23 + field=models.CharField(unique=True, max_length=255),
  24 + preserve_default=True,
  25 + ),
  26 + ]
... ...
colab/plugins/migrations/0003_auto_20151028_1738.py 0 → 100644
... ... @@ -0,0 +1,21 @@
  1 +# -*- coding: utf-8 -*-
  2 +from __future__ import unicode_literals
  3 +
  4 +from django.db import models, migrations
  5 +import datetime
  6 +
  7 +
  8 +class Migration(migrations.Migration):
  9 +
  10 + dependencies = [
  11 + ('plugins', '0002_auto_20151028_1730'),
  12 + ]
  13 +
  14 + operations = [
  15 + migrations.AlterField(
  16 + model_name='timestampplugin',
  17 + name='timestamp',
  18 + field=models.DateTimeField(default=datetime.datetime(1, 1, 1, 0, 0), blank=True),
  19 + preserve_default=True,
  20 + ),
  21 + ]
... ...
colab/plugins/migrations/__init__.py 0 → 100644
colab/plugins/models.py 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +from django.db import models
  2 +from datetime import datetime
  3 +
  4 +class TimeStampPlugin(models.Model):
  5 + '''
  6 + Class used to store timestamp from plugins
  7 + '''
  8 + id = models.IntegerField(primary_key= True)
  9 + name = models.CharField(max_length=255,unique=True,null=False)
  10 + timestamp = models.DateTimeField(default=datetime.min,blank=True)
... ...