From 9fe496d266d5223077dfb6cbe498dcfe4090a0ed Mon Sep 17 00:00:00 2001 From: Salman Ashraf Date: Wed, 10 Jul 2024 15:00:10 +0000 Subject: [PATCH] apply initial migrations --- api/migrations/0001_initial.py | 58 ++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 api/migrations/0001_initial.py diff --git a/api/migrations/0001_initial.py b/api/migrations/0001_initial.py new file mode 100644 index 0000000..d990b0e --- /dev/null +++ b/api/migrations/0001_initial.py @@ -0,0 +1,58 @@ +# Generated by Django 3.2.25 on 2024-07-10 14:59 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Contributor', + fields=[ + ('id', models.IntegerField(primary_key=True, serialize=False)), + ('email', models.EmailField(max_length=254)), + ('name', models.TextField()), + ('location', models.TextField()), + ('html_url', models.TextField()), + ('avatar_url', models.TextField()), + ], + options={ + 'verbose_name': 'contributor', + 'verbose_name_plural': 'contributors', + }, + ), + migrations.CreateModel( + name='Repository', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('gh_id', models.IntegerField(verbose_name='GitHub ID')), + ('points', models.IntegerField(default=0)), + ('contributor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.contributor')), + ], + options={ + 'verbose_name': 'repository', + 'verbose_name_plural': 'repositories', + 'unique_together': {('contributor', 'gh_id')}, + }, + ), + migrations.CreateModel( + name='AgreementSignature', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('agreement_id', models.CharField(max_length=40)), + ('signed_at', models.DateTimeField()), + ('contributor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.contributor')), + ], + options={ + 'verbose_name': 'agreement_signature', + 'verbose_name_plural': 'agreement_signatures', + 'unique_together': {('contributor', 'agreement_id')}, + }, + ), + ]