-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #541 from furlongm/v2-migrations
add migrations from v2
- Loading branch information
Showing
20 changed files
with
513 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Generated by Django 3.2.19 on 2023-12-11 22:15 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='MachineArchitecture', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=255, unique=True)), | ||
], | ||
options={ | ||
'verbose_name': 'Machine Architecture', | ||
'abstract': False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='PackageArchitecture', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=255, unique=True)), | ||
], | ||
options={ | ||
'verbose_name': 'Package Architecture', | ||
'abstract': False, | ||
}, | ||
), | ||
] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Generated by Django 3.2.19 on 2023-12-11 22:15 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Domain', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=255, unique=True)), | ||
], | ||
), | ||
] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Generated by Django 3.2.19 on 2023-12-11 22:15 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import django.utils.timezone | ||
import tagging.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Host', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('hostname', models.CharField(max_length=255, unique=True)), | ||
('ipaddress', models.GenericIPAddressField()), | ||
('reversedns', models.CharField(blank=True, max_length=255, null=True)), | ||
('check_dns', models.BooleanField(default=False)), | ||
('kernel', models.CharField(max_length=255)), | ||
('lastreport', models.DateTimeField()), | ||
('reboot_required', models.BooleanField(default=False)), | ||
('host_repos_only', models.BooleanField(default=True)), | ||
('tags', tagging.fields.TagField(blank=True, max_length=255)), | ||
('updated_at', models.DateTimeField(default=django.utils.timezone.now)), | ||
], | ||
options={ | ||
'verbose_name': 'Host', | ||
'verbose_name_plural': 'Hosts', | ||
'ordering': ('hostname',), | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='HostRepo', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('enabled', models.BooleanField(default=True)), | ||
('priority', models.IntegerField(default=0)), | ||
('host', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hosts.host')), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Generated by Django 3.2.19 on 2023-12-11 22:15 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('domains', '0001_initial'), | ||
('packages', '0001_initial'), | ||
('arch', '0001_initial'), | ||
('operatingsystems', '0002_initial'), | ||
('hosts', '0001_initial'), | ||
('repos', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='hostrepo', | ||
name='repo', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='repos.repository'), | ||
), | ||
migrations.AddField( | ||
model_name='host', | ||
name='arch', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='arch.machinearchitecture'), | ||
), | ||
migrations.AddField( | ||
model_name='host', | ||
name='domain', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domains.domain'), | ||
), | ||
migrations.AddField( | ||
model_name='host', | ||
name='os', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='operatingsystems.os'), | ||
), | ||
migrations.AddField( | ||
model_name='host', | ||
name='packages', | ||
field=models.ManyToManyField(blank=True, to='packages.Package'), | ||
), | ||
migrations.AddField( | ||
model_name='host', | ||
name='repos', | ||
field=models.ManyToManyField(blank=True, through='hosts.HostRepo', to='repos.Repository'), | ||
), | ||
migrations.AddField( | ||
model_name='host', | ||
name='updates', | ||
field=models.ManyToManyField(blank=True, to='packages.PackageUpdate'), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='hostrepo', | ||
unique_together={('host', 'repo')}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 3.2.19 on 2023-12-11 22:24 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('modules', '0001_initial'), | ||
('hosts', '0002_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='host', | ||
name='modules', | ||
field=models.ManyToManyField(blank=True, to='modules.Module'), | ||
), | ||
] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Generated by Django 3.2.19 on 2023-12-11 22:17 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('packages', '0001_initial'), | ||
('arch', '0001_initial'), | ||
('repos', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Module', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=255, unique=True)), | ||
('stream', models.CharField(max_length=255, unique=True)), | ||
('version', models.CharField(max_length=255)), | ||
('context', models.CharField(max_length=255, unique=True)), | ||
('arch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='arch.packagearchitecture')), | ||
('packages', models.ManyToManyField(blank=True, to='packages.Package')), | ||
('repo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='repos.repository')), | ||
], | ||
options={ | ||
'verbose_name': 'Module', | ||
'verbose_name_plural': 'Modules', | ||
'ordering': ('name',), | ||
}, | ||
), | ||
] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Generated by Django 3.2.19 on 2023-12-11 22:15 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='OS', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=255, unique=True)), | ||
], | ||
options={ | ||
'verbose_name': 'Operating System', | ||
'verbose_name_plural': 'Operating Systems', | ||
'ordering': ('name',), | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='OSGroup', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=255, unique=True)), | ||
], | ||
options={ | ||
'verbose_name': 'Operating System Group', | ||
'verbose_name_plural': 'Operating System Groups', | ||
'ordering': ('name',), | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 3.2.19 on 2023-12-11 22:15 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('operatingsystems', '0001_initial'), | ||
('repos', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='osgroup', | ||
name='repos', | ||
field=models.ManyToManyField(blank=True, to='repos.Repository'), | ||
), | ||
migrations.AddField( | ||
model_name='os', | ||
name='osgroup', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='operatingsystems.osgroup'), | ||
), | ||
] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# Generated by Django 3.2.19 on 2023-12-11 22:15 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('arch', '0001_initial'), | ||
('operatingsystems', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='PackageString', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=255)), | ||
('version', models.CharField(max_length=255)), | ||
('epoch', models.CharField(blank=True, max_length=255, null=True)), | ||
('release', models.CharField(blank=True, max_length=255, null=True)), | ||
('arch', models.CharField(max_length=255)), | ||
('packagetype', models.CharField(blank=True, max_length=1, null=True)), | ||
('description', models.TextField(blank=True, null=True)), | ||
('url', models.URLField(blank=True, max_length=255, null=True)), | ||
], | ||
options={ | ||
'managed': False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='ErratumReference', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('url', models.URLField(max_length=255)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='PackageName', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=255, unique=True)), | ||
], | ||
options={ | ||
'verbose_name': 'Package', | ||
'verbose_name_plural': 'Packages', | ||
'ordering': ('name',), | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Package', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('epoch', models.CharField(blank=True, max_length=255, null=True)), | ||
('version', models.CharField(max_length=255)), | ||
('release', models.CharField(blank=True, max_length=255, null=True)), | ||
('packagetype', models.CharField(blank=True, choices=[('R', 'rpm'), ('D', 'deb'), ('A', 'arch'), ('U', 'unknown')], max_length=1, null=True)), | ||
('description', models.TextField(blank=True, null=True)), | ||
('url', models.URLField(blank=True, max_length=255, null=True)), | ||
('arch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='arch.packagearchitecture')), | ||
('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='packages.packagename')), | ||
], | ||
options={ | ||
'ordering': ('name', 'epoch', 'version', 'release', 'arch'), | ||
'unique_together': {('name', 'epoch', 'version', 'release', 'arch', 'packagetype')}, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Erratum', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=255)), | ||
('etype', models.CharField(max_length=255)), | ||
('issue_date', models.DateTimeField()), | ||
('synopsis', models.CharField(max_length=255)), | ||
('arches', models.ManyToManyField(blank=True, to='arch.MachineArchitecture')), | ||
('packages', models.ManyToManyField(blank=True, to='packages.Package')), | ||
('references', models.ManyToManyField(blank=True, to='packages.ErratumReference')), | ||
('releases', models.ManyToManyField(blank=True, to='operatingsystems.OSGroup')), | ||
], | ||
options={ | ||
'verbose_name': 'Erratum', | ||
'verbose_name_plural': 'Errata', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='PackageUpdate', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('security', models.BooleanField(default=False)), | ||
('newpackage', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='newpackage', to='packages.package')), | ||
('oldpackage', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='oldpackage', to='packages.package')), | ||
], | ||
options={ | ||
'unique_together': {('oldpackage', 'newpackage', 'security')}, | ||
}, | ||
), | ||
] |
Empty file.
Oops, something went wrong.