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