Postgres
This commit is contained in:
parent
7f848c713b
commit
f4289c70af
@ -2,6 +2,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
import django.contrib.postgres.fields
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
@ -13,16 +14,16 @@ class Migration(migrations.Migration):
|
|||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Exercise',
|
name='Exercise',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
('id', models.AutoField(verbose_name='ID', auto_created=True, primary_key=True, serialize=False)),
|
||||||
('name', models.CharField(max_length=200)),
|
('names', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=200), size=None)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Set',
|
name='Set',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
('id', models.AutoField(verbose_name='ID', auto_created=True, primary_key=True, serialize=False)),
|
||||||
('date', models.DateField()),
|
('date', models.DateField()),
|
||||||
('weight_kg', models.DecimalField(max_digits=7, decimal_places=3)),
|
('weight_kg', models.DecimalField(decimal_places=3, max_digits=7)),
|
||||||
('reps', models.PositiveIntegerField()),
|
('reps', models.PositiveIntegerField()),
|
||||||
('source', models.CharField(max_length=100)),
|
('source', models.CharField(max_length=100)),
|
||||||
('exercise', models.ForeignKey(to='lifting.Exercise', related_name='sets')),
|
('exercise', models.ForeignKey(to='lifting.Exercise', related_name='sets')),
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
pytest
|
pytest
|
||||||
--pre Django
|
Django==1.8.0
|
||||||
|
psycopg2
|
||||||
|
@ -64,8 +64,12 @@ WSGI_APPLICATION = 'web.wsgi.application'
|
|||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
'NAME': 'bia',
|
||||||
|
'USER': 'bia',
|
||||||
|
'PASSWORD': 'test',
|
||||||
|
'HOST': '10.135.1.101',
|
||||||
|
'PORT': '5432',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user