mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
47 lines
1.6 KiB
Python
47 lines
1.6 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.9.8 on 2016-07-26 21:58
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Tenant',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('created', models.DateField(auto_now_add=True)),
|
|
('last_updated', models.DateTimeField(auto_now=True)),
|
|
('name', models.CharField(max_length=30, unique=True)),
|
|
('slug', models.SlugField(unique=True)),
|
|
('description', models.CharField(blank=True, help_text=b'Long-form name (optional)', max_length=100)),
|
|
('comments', models.TextField(blank=True)),
|
|
],
|
|
options={
|
|
'ordering': ['group', 'name'],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='TenantGroup',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=50, unique=True)),
|
|
('slug', models.SlugField(unique=True)),
|
|
],
|
|
options={
|
|
'ordering': ['name'],
|
|
},
|
|
),
|
|
migrations.AddField(
|
|
model_name='tenant',
|
|
name='group',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='tenants', to='tenancy.TenantGroup'),
|
|
),
|
|
]
|