mpri-webdam/profiles/migrations/0001_initial.py

133 lines
5.7 KiB
Python

# Generated by Django 2.0.1 on 2018-01-24 21:48
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='BrowserFingerprint',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('description', models.CharField(max_length=256)),
('useragent', models.CharField(max_length=256)),
('appname', models.CharField(max_length=256)),
('appversion', models.CharField(max_length=256)),
('platform', models.CharField(max_length=256)),
('vendor', models.CharField(max_length=256)),
('vendorsub', models.CharField(max_length=256)),
('buildID', models.CharField(max_length=256)),
('oscpu', models.CharField(max_length=256)),
('accept_encoding', models.CharField(max_length=256)),
('accept_default', models.CharField(max_length=256)),
('accept_lang', models.CharField(max_length=256)),
('pixeldepth', models.IntegerField()),
('colordepth', models.IntegerField()),
('screens', models.CharField(max_length=256)),
],
),
migrations.CreateModel(
name='Event',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=256)),
('date', models.DateTimeField()),
],
),
migrations.CreateModel(
name='Interest',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=256)),
('events', models.ManyToManyField(to='profiles.Event')),
],
),
migrations.CreateModel(
name='Keyword',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('text', models.CharField(max_length=256)),
],
),
migrations.CreateModel(
name='Place',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=256)),
('address', models.CharField(max_length=512)),
('lat', models.FloatField(blank=True, verbose_name='Latitude')),
('lon', models.FloatField(blank=True, verbose_name='Longitude')),
],
),
migrations.CreateModel(
name='Profile',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('nick', models.CharField(help_text="The user's online identity", max_length=64)),
('first_name', models.CharField(max_length=64)),
('last_name', models.CharField(max_length=64)),
('email', models.EmailField(max_length=254)),
('uses_urls', models.BooleanField(help_text='Does the user usually go to a given website using its url or searching it in a search engine?')),
('browser_fingerprint', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='profiles.BrowserFingerprint')),
('interests', models.ManyToManyField(to='profiles.Interest')),
],
),
migrations.CreateModel(
name='SearchEngine',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=256)),
('url', models.URLField()),
('query_pattern', models.CharField(max_length=256)),
],
),
migrations.CreateModel(
name='Webpage',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('url', models.URLField()),
],
),
migrations.CreateModel(
name='Website',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=256)),
('url', models.URLField()),
('keywords', models.ManyToManyField(to='profiles.Keyword')),
('notable_pages', models.ManyToManyField(to='profiles.Webpage')),
],
),
migrations.AddField(
model_name='profile',
name='search_engine',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='profiles.SearchEngine'),
),
migrations.AddField(
model_name='interest',
name='keywords',
field=models.ManyToManyField(to='profiles.Keyword'),
),
migrations.AddField(
model_name='interest',
name='places',
field=models.ManyToManyField(to='profiles.Place'),
),
migrations.AddField(
model_name='interest',
name='websites',
field=models.ManyToManyField(to='profiles.Website'),
),
migrations.AddField(
model_name='event',
name='place',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='profiles.Place'),
),
]