summaryrefslogtreecommitdiffstats
path: root/tools/pharos-dashboard/dashboard/migrations/0001_initial.py
diff options
context:
space:
mode:
authorJack Morgan <jack.morgan@intel.com>2016-08-22 14:13:06 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-22 14:13:06 +0000
commitc121ae90322dac5cf72e98450c89ff7e5131b20c (patch)
tree51b6c58e102777649940686915da48aab5971fac /tools/pharos-dashboard/dashboard/migrations/0001_initial.py
parente4649cce49068942ef754746fdd5bc75636075de (diff)
parent3b5ef3b0a88247eeafeee878de528aad71f9fd4b (diff)
Merge "Split the dashboard into different apps, add tests"
Diffstat (limited to 'tools/pharos-dashboard/dashboard/migrations/0001_initial.py')
-rw-r--r--tools/pharos-dashboard/dashboard/migrations/0001_initial.py82
1 files changed, 3 insertions, 79 deletions
diff --git a/tools/pharos-dashboard/dashboard/migrations/0001_initial.py b/tools/pharos-dashboard/dashboard/migrations/0001_initial.py
index 12de299e..b93d8290 100644
--- a/tools/pharos-dashboard/dashboard/migrations/0001_initial.py
+++ b/tools/pharos-dashboard/dashboard/migrations/0001_initial.py
@@ -1,10 +1,8 @@
# -*- coding: utf-8 -*-
-# Generated by Django 1.9.8 on 2016-07-24 13:06
+# Generated by Django 1.10 on 2016-08-12 09:51
from __future__ import unicode_literals
-from django.conf import settings
from django.db import migrations, models
-import django.db.models.deletion
class Migration(migrations.Migration):
@@ -12,42 +10,16 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
- name='Booking',
- fields=[
- ('booking_id', models.AutoField(primary_key=True, serialize=False)),
- ('start_date_time', models.DateTimeField()),
- ('end_date_time', models.DateTimeField()),
- ('creation', models.DateTimeField(auto_now=True)),
- ('purpose', models.CharField(max_length=300)),
- ],
- options={
- 'db_table': 'booking',
- },
- ),
- migrations.CreateModel(
- name='Pod',
- fields=[
- ('pod_id', models.AutoField(primary_key=True, serialize=False)),
- ('chassis', models.CharField(blank=True, max_length=500, null=True)),
- ],
- options={
- 'db_table': 'pod',
- },
- ),
- migrations.CreateModel(
name='Resource',
fields=[
- ('resource_id', models.AutoField(
- primary_key=True, serialize=False)),
+ ('id', models.AutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=100, unique=True)),
('slavename', models.CharField(blank=True, max_length=50, null=True)),
- ('description', models.CharField(
- blank=True, max_length=300, null=True)),
+ ('description', models.CharField(blank=True, max_length=300, null=True)),
('url', models.CharField(blank=True, max_length=100, null=True)),
('bookable', models.BooleanField(default=False)),
('active', models.BooleanField(default=True)),
@@ -56,52 +28,4 @@ class Migration(migrations.Migration):
'db_table': 'resource',
},
),
- migrations.CreateModel(
- name='Server',
- fields=[
- ('server_id', models.AutoField(primary_key=True, serialize=False)),
- ('model', models.CharField(blank=True, max_length=200, null=True)),
- ('cpu', models.CharField(blank=True, max_length=200, null=True)),
- ('ram', models.CharField(blank=True, max_length=200, null=True)),
- ('storage', models.CharField(blank=True, max_length=200, null=True)),
- ('count', models.IntegerField(default=1)),
- ('resource', models.ForeignKey(
- on_delete=django.db.models.deletion.DO_NOTHING, to='dashboard.Resource')),
- ],
- options={
- 'db_table': 'server',
- },
- ),
- migrations.CreateModel(
- name='UserResource',
- fields=[
- ('user_resource_id', models.AutoField(
- primary_key=True, serialize=False)),
- ('resource', models.ForeignKey(
- on_delete=django.db.models.deletion.CASCADE, to='dashboard.Resource')),
- ('user', models.ForeignKey(
- on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
- ],
- options={
- 'db_table': 'user_resource',
- },
- ),
- migrations.AddField(
- model_name='pod',
- name='resource',
- field=models.ForeignKey(
- on_delete=django.db.models.deletion.CASCADE, to='dashboard.Resource'),
- ),
- migrations.AddField(
- model_name='booking',
- name='resource',
- field=models.ForeignKey(
- on_delete=django.db.models.deletion.PROTECT, to='dashboard.Resource'),
- ),
- migrations.AddField(
- model_name='booking',
- name='user',
- field=models.ForeignKey(
- on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
- ),
]