mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 06:26:00 -03:30
For new installs the database may not be online and thus the migration can't happen. This will allow it to continue but we may want more messaging to the user running potential upgrades
30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations, models
|
|
import jsonbfield.fields
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('main', '0003_v300_changes'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Fact',
|
|
fields=[
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
('timestamp', models.DateTimeField(default=None, help_text='Date and time of the corresponding fact scan gathering time.', editable=False)),
|
|
('module', models.CharField(max_length=128)),
|
|
('facts', jsonbfield.fields.JSONField(default={}, help_text='Arbitrary JSON structure of module facts captured at timestamp for a single host.', blank=True)),
|
|
('host', models.ForeignKey(related_name='facts', to='main.Host', help_text='Host for the facts that the fact scan captured.')),
|
|
],
|
|
),
|
|
migrations.AlterIndexTogether(
|
|
name='fact',
|
|
index_together=set([('timestamp', 'module', 'host')]),
|
|
),
|
|
]
|