Cloud-CV/EvalAI

View on GitHub
apps/challenges/migrations/0001_initial.py

Summary

Maintainability
A
0 mins
Test Coverage
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-28 04:11
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [("hosts", "0001_initial")]

    operations = [
        migrations.CreateModel(
            name="Challenge",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("modified_at", models.DateTimeField(auto_now=True)),
                ("title", models.CharField(max_length=100)),
                ("description", models.TextField(blank=True, null=True)),
                (
                    "terms_and_conditions",
                    models.TextField(blank=True, null=True),
                ),
                (
                    "submission_guidelines",
                    models.TextField(blank=True, null=True),
                ),
                (
                    "evaluation_details",
                    models.TextField(blank=True, null=True),
                ),
                (
                    "image",
                    models.ImageField(
                        blank=True,
                        null=True,
                        upload_to="logos",
                        verbose_name="Logo",
                    ),
                ),
                (
                    "start_date",
                    models.DateTimeField(
                        blank=True, null=True, verbose_name="Start Date (UTC)"
                    ),
                ),
                (
                    "end_date",
                    models.DateTimeField(
                        blank=True, null=True, verbose_name="End Date (UTC)"
                    ),
                ),
                (
                    "published",
                    models.BooleanField(
                        default=False, verbose_name="Publicly Available"
                    ),
                ),
                ("enable_forum", models.BooleanField(default=True)),
                ("anonymous_leaderboard", models.BooleanField(default=False)),
                (
                    "creator",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="challenge_creator",
                        to="hosts.ChallengeHostTeam",
                    ),
                ),
            ],
            options={"db_table": "challenge"},
        ),
        migrations.CreateModel(
            name="Phase",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("modified_at", models.DateTimeField(auto_now=True)),
                ("name", models.CharField(max_length=100)),
                ("description", models.TextField()),
                ("leaderboard_public", models.BooleanField(default=False)),
                (
                    "challenge",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="challenges.Challenge",
                    ),
                ),
            ],
            options={"db_table": "challenge_phase"},
        ),
    ]