gva/gnuviechadmin/osusers/migrations/0001_initial.py
2014-05-24 21:28:33 +02:00

98 lines
No EOL
6.2 KiB
Python

# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Group'
db.create_table(u'osusers_group', (
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('groupname', self.gf('django.db.models.fields.CharField')(unique=True, max_length=16)),
('gid', self.gf('django.db.models.fields.PositiveSmallIntegerField')(unique=True, primary_key=True)),
('descr', self.gf('django.db.models.fields.TextField')(blank=True)),
('passwd', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)),
))
db.send_create_signal(u'osusers', ['Group'])
# Adding model 'User'
db.create_table(u'osusers_user', (
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('username', self.gf('django.db.models.fields.CharField')(unique=True, max_length=64)),
('uid', self.gf('django.db.models.fields.PositiveSmallIntegerField')(unique=True, primary_key=True)),
('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['osusers.Group'])),
('gecos', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)),
('homedir', self.gf('django.db.models.fields.CharField')(max_length=256)),
('shell', self.gf('django.db.models.fields.CharField')(max_length=64)),
))
db.send_create_signal(u'osusers', ['User'])
# Adding model 'Shadow'
db.create_table(u'osusers_shadow', (
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['osusers.User'], unique=True, primary_key=True)),
('passwd', self.gf('django.db.models.fields.CharField')(max_length=128)),
('changedays', self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True)),
('minage', self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True)),
('maxage', self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True)),
('gracedays', self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True)),
('inactdays', self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True)),
('expiredays', self.gf('django.db.models.fields.PositiveSmallIntegerField')(default=None, null=True, blank=True)),
))
db.send_create_signal(u'osusers', ['Shadow'])
def backwards(self, orm):
# Deleting model 'Group'
db.delete_table(u'osusers_group')
# Deleting model 'User'
db.delete_table(u'osusers_user')
# Deleting model 'Shadow'
db.delete_table(u'osusers_shadow')
models = {
u'osusers.group': {
'Meta': {'object_name': 'Group'},
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'descr': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}),
'groupname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '16'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'})
},
u'osusers.shadow': {
'Meta': {'object_name': 'Shadow'},
'changedays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'expiredays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'gracedays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'inactdays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'maxage': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'minage': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['osusers.User']", 'unique': 'True', 'primary_key': 'True'})
},
u'osusers.user': {
'Meta': {'object_name': 'User'},
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'gecos': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}),
'homedir': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'shell': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'})
}
}
complete_apps = ['osusers']