2018-09-03 14:10:44 +00:00
|
|
|
# Generated by Django 2.1 on 2018-09-03 14:09
|
2018-08-26 00:32:55 +00:00
|
|
|
|
|
|
|
from django.db import migrations, models
|
2018-09-01 13:32:04 +00:00
|
|
|
import django.db.models.deletion
|
2018-08-26 00:32:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
2018-09-03 14:10:44 +00:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='Edge',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('weight', models.FloatField(blank=True, null=True)),
|
|
|
|
('last_updated', models.DateTimeField()),
|
|
|
|
],
|
|
|
|
),
|
2018-08-26 00:32:55 +00:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='Instance',
|
|
|
|
fields=[
|
2018-08-26 18:15:50 +00:00
|
|
|
('name', models.CharField(max_length=200, primary_key=True, serialize=False)),
|
2018-09-01 13:32:04 +00:00
|
|
|
('description', models.TextField(blank=True)),
|
2018-08-29 17:58:06 +00:00
|
|
|
('domain_count', models.IntegerField(blank=True, null=True)),
|
|
|
|
('status_count', models.IntegerField(blank=True, null=True)),
|
|
|
|
('user_count', models.IntegerField(blank=True, null=True)),
|
2018-08-26 18:15:50 +00:00
|
|
|
('version', models.CharField(blank=True, max_length=1000)),
|
2018-08-26 00:32:55 +00:00
|
|
|
('status', models.CharField(max_length=100)),
|
2018-09-03 14:10:44 +00:00
|
|
|
('x_coord', models.FloatField(blank=True, null=True)),
|
|
|
|
('y_coord', models.FloatField(blank=True, null=True)),
|
2018-08-29 17:58:06 +00:00
|
|
|
('first_seen', models.DateTimeField(auto_now_add=True)),
|
|
|
|
('last_updated', models.DateTimeField(auto_now=True)),
|
2018-08-26 00:32:55 +00:00
|
|
|
],
|
|
|
|
),
|
2018-09-01 13:32:04 +00:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='PeerRelationship',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
2018-09-02 22:04:03 +00:00
|
|
|
('mention_count', models.IntegerField(blank=True, null=True)),
|
|
|
|
('statuses_seen', models.IntegerField(blank=True, null=True)),
|
2018-09-01 13:32:04 +00:00
|
|
|
('first_seen', models.DateTimeField(auto_now_add=True)),
|
2018-09-02 22:04:03 +00:00
|
|
|
('last_updated', models.DateTimeField(auto_now=True)),
|
2018-09-01 13:32:04 +00:00
|
|
|
('source', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='following_relationship', to='scraper.Instance')),
|
|
|
|
('target', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='follower_relationships', to='scraper.Instance')),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='instance',
|
2018-09-01 17:24:05 +00:00
|
|
|
name='peers',
|
|
|
|
field=models.ManyToManyField(through='scraper.PeerRelationship', to='scraper.Instance'),
|
2018-09-01 13:32:04 +00:00
|
|
|
),
|
2018-09-03 14:10:44 +00:00
|
|
|
migrations.AddField(
|
|
|
|
model_name='edge',
|
|
|
|
name='source',
|
|
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='scraper.Instance'),
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='edge',
|
|
|
|
name='target',
|
|
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='scraper.Instance'),
|
|
|
|
),
|
2018-08-26 00:32:55 +00:00
|
|
|
]
|