Skip to content

Commit

Permalink
Bumped version to 1.0.0. Changed data(HStoreField) to JSONField
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Pradan committed Jun 22, 2016
1 parent 41b5d8c commit 506dec6
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ update/delete operations.
Snapshots are available in a global form as well.

This app requires:
- Django>=1.7
- Django>=1.9 (For Django <1.9 please use django-atris <1.0.0)
- Postgresql
- Python>=2.7 or Python>=3.4

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='django-atris',
version='0.1.25',
version='1.0.0',
description='Django history logging.',
long_description=(
'Django history logger that keeps track of changes on a global '
Expand All @@ -20,6 +20,6 @@
include_package_data=True,
zip_safe=False,
install_requires=[
'Django>=1.7,<1.9',
'Django>=1.9,<1.10',
]
)
36 changes: 36 additions & 0 deletions src/atris/migrations/0006_auto_20160622_0720.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-22 11:20
from __future__ import unicode_literals

import django.contrib.postgres.fields.jsonb
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('atris', '0005_auto_20160411_0250'),
]

operations = [
migrations.AlterField(
model_name='archivedhistoricalrecord',
name='additional_data',
field=django.contrib.postgres.fields.jsonb.JSONField(null=True),
),
migrations.AlterField(
model_name='archivedhistoricalrecord',
name='data',
field=django.contrib.postgres.fields.jsonb.JSONField(),
),
migrations.AlterField(
model_name='historicalrecord',
name='additional_data',
field=django.contrib.postgres.fields.jsonb.JSONField(null=True),
),
migrations.AlterField(
model_name='historicalrecord',
name='data',
field=django.contrib.postgres.fields.jsonb.JSONField(),
),
]
6 changes: 3 additions & 3 deletions src/atris/models/abstract_historical_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.contrib.postgres.fields import HStoreField, ArrayField
from django.contrib.postgres.fields import ArrayField, JSONField
from django.db import models, connection
from django.db.models.query import QuerySet
from django.utils import six
Expand Down Expand Up @@ -133,8 +133,8 @@ class AbstractHistoricalRecord(models.Model):
history_diff = ArrayField(models.CharField(max_length=200),
blank=True, null=True)

data = HStoreField()
additional_data = HStoreField(null=True)
data = JSONField()
additional_data = JSONField(null=True)
objects = HistoricalRecordQuerySet.as_manager()

def __unicode__(self):
Expand Down

2 comments on commit 506dec6

@bogdanpop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this change! ❤️

@mvmocanu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After you wanted it for a while, now you have it! Thanks to @andreipradan

Please sign in to comment.