From d0e813f4d19d44d542f803af3c4019e457e007fc Mon Sep 17 00:00:00 2001 From: Patrick Rauscher Date: Mon, 30 Sep 2013 16:02:05 +0200 Subject: [PATCH] add migrations --- accounting/migrations/0001_initial.py | 100 ++++++++++++++ accounting/migrations/__init__.py | 0 crm/migrations/0001_initial.py | 160 ++++++++++++++++++++++ crm/migrations/__init__.py | 0 crm_accounting/migrations/0001_initial.py | 86 ++++++++++++ crm_accounting/migrations/__init__.py | 0 crm_contacts/migrations/0001_initial.py | 136 ++++++++++++++++++ crm_contacts/migrations/__init__.py | 0 crm_document/migrations/0001_initial.py | 63 +++++++++ crm_document/migrations/__init__.py | 0 crm_member/migrations/0001_initial.py | 81 +++++++++++ crm_member/migrations/__init__.py | 0 vpanel2/settings.py | 1 + 13 files changed, 627 insertions(+) create mode 100644 accounting/migrations/0001_initial.py create mode 100644 accounting/migrations/__init__.py create mode 100644 crm/migrations/0001_initial.py create mode 100644 crm/migrations/__init__.py create mode 100644 crm_accounting/migrations/0001_initial.py create mode 100644 crm_accounting/migrations/__init__.py create mode 100644 crm_contacts/migrations/0001_initial.py create mode 100644 crm_contacts/migrations/__init__.py create mode 100644 crm_document/migrations/0001_initial.py create mode 100644 crm_document/migrations/__init__.py create mode 100644 crm_member/migrations/0001_initial.py create mode 100644 crm_member/migrations/__init__.py diff --git a/accounting/migrations/0001_initial.py b/accounting/migrations/0001_initial.py new file mode 100644 index 0000000..f30f45f --- /dev/null +++ b/accounting/migrations/0001_initial.py @@ -0,0 +1,100 @@ +# -*- coding: utf-8 -*- +import 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 'Journal' + db.create_table(u'accounting_journal', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=30)), + ('allowNull', self.gf('django.db.models.fields.BooleanField')(default=False)), + )) + db.send_create_signal(u'accounting', ['Journal']) + + # Adding M2M table for field rootAccounts on 'Journal' + m2m_table_name = db.shorten_name(u'accounting_journal_rootAccounts') + db.create_table(m2m_table_name, ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('journal', models.ForeignKey(orm[u'accounting.journal'], null=False)), + ('account', models.ForeignKey(orm[u'accounting.account'], null=False)) + )) + db.create_unique(m2m_table_name, ['journal_id', 'account_id']) + + # Adding model 'Account' + db.create_table(u'accounting_account', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['accounting.Account'], null=True, blank=True)), + ('code', self.gf('django.db.models.fields.CharField')(max_length=10)), + ('name', self.gf('django.db.models.fields.CharField')(max_length=50)), + )) + db.send_create_signal(u'accounting', ['Account']) + + # Adding model 'Record' + db.create_table(u'accounting_record', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + )) + db.send_create_signal(u'accounting', ['Record']) + + # Adding model 'Split' + db.create_table(u'accounting_split', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('record', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['accounting.Record'])), + ('account', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['accounting.Account'])), + ('note', self.gf('django.db.models.fields.CharField')(max_length=50)), + ('value', self.gf('django.db.models.fields.IntegerField')()), + )) + db.send_create_signal(u'accounting', ['Split']) + + + def backwards(self, orm): + # Deleting model 'Journal' + db.delete_table(u'accounting_journal') + + # Removing M2M table for field rootAccounts on 'Journal' + db.delete_table(db.shorten_name(u'accounting_journal_rootAccounts')) + + # Deleting model 'Account' + db.delete_table(u'accounting_account') + + # Deleting model 'Record' + db.delete_table(u'accounting_record') + + # Deleting model 'Split' + db.delete_table(u'accounting_split') + + + models = { + u'accounting.account': { + 'Meta': {'object_name': 'Account'}, + 'code': ('django.db.models.fields.CharField', [], {'max_length': '10'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['accounting.Account']", 'null': 'True', 'blank': 'True'}) + }, + u'accounting.journal': { + 'Meta': {'object_name': 'Journal'}, + 'allowNull': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), + 'rootAccounts': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['accounting.Account']", 'symmetrical': 'False'}) + }, + u'accounting.record': { + 'Meta': {'object_name': 'Record'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + u'accounting.split': { + 'Meta': {'object_name': 'Split'}, + 'account': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['accounting.Account']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'note': ('django.db.models.fields.CharField', [], {'max_length': '50'}), + 'record': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['accounting.Record']"}), + 'value': ('django.db.models.fields.IntegerField', [], {}) + } + } + + complete_apps = ['accounting'] \ No newline at end of file diff --git a/accounting/migrations/__init__.py b/accounting/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/crm/migrations/0001_initial.py b/crm/migrations/0001_initial.py new file mode 100644 index 0000000..dcc1546 --- /dev/null +++ b/crm/migrations/0001_initial.py @@ -0,0 +1,160 @@ +# -*- coding: utf-8 -*- +import 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 'Entity' + db.create_table(u'crm_entity', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('memo', self.gf('django.db.models.fields.TextField')(blank=True)), + )) + db.send_create_signal(u'crm', ['Entity']) + + # Adding M2M table for field links on 'Entity' + m2m_table_name = db.shorten_name(u'crm_entity_links') + db.create_table(m2m_table_name, ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('from_entity', models.ForeignKey(orm[u'crm.entity'], null=False)), + ('to_entity', models.ForeignKey(orm[u'crm.entity'], null=False)) + )) + db.create_unique(m2m_table_name, ['from_entity_id', 'to_entity_id']) + + # Adding M2M table for field tags on 'Entity' + m2m_table_name = db.shorten_name(u'crm_entity_tags') + db.create_table(m2m_table_name, ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('entity', models.ForeignKey(orm[u'crm.entity'], null=False)), + ('tag', models.ForeignKey(orm[u'crm.tag'], null=False)) + )) + db.create_unique(m2m_table_name, ['entity_id', 'tag_id']) + + # Adding model 'Tag' + db.create_table(u'crm_tag', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=30)), + )) + db.send_create_signal(u'crm', ['Tag']) + + # Adding model 'Process' + db.create_table(u'crm_process', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('start', self.gf('django.db.models.fields.DateTimeField')()), + ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), + )) + db.send_create_signal(u'crm', ['Process']) + + # Adding model 'Filter' + db.create_table(u'crm_filter', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('name', self.gf('django.db.models.fields.CharField')(max_length=70)), + )) + db.send_create_signal(u'crm', ['Filter']) + + # Adding model 'Invariant' + db.create_table(u'crm_invariant', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('filter', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['crm.Filter'])), + ('name', self.gf('django.db.models.fields.CharField')(max_length=50)), + ('description', self.gf('django.db.models.fields.TextField')()), + )) + db.send_create_signal(u'crm', ['Invariant']) + + + def backwards(self, orm): + # Deleting model 'Entity' + db.delete_table(u'crm_entity') + + # Removing M2M table for field links on 'Entity' + db.delete_table(db.shorten_name(u'crm_entity_links')) + + # Removing M2M table for field tags on 'Entity' + db.delete_table(db.shorten_name(u'crm_entity_tags')) + + # Deleting model 'Tag' + db.delete_table(u'crm_tag') + + # Deleting model 'Process' + db.delete_table(u'crm_process') + + # Deleting model 'Filter' + db.delete_table(u'crm_filter') + + # Deleting model 'Invariant' + db.delete_table(u'crm_invariant') + + + models = { + u'auth.group': { + 'Meta': {'object_name': 'Group'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'auth.permission': { + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + u'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + u'crm.entity': { + 'Meta': {'object_name': 'Entity'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'links': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'links_rel_+'", 'blank': 'True', 'to': u"orm['crm.Entity']"}), + 'memo': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['crm.Tag']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'crm.filter': { + 'Meta': {'object_name': 'Filter'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '70'}) + }, + u'crm.invariant': { + 'Meta': {'object_name': 'Invariant'}, + 'description': ('django.db.models.fields.TextField', [], {}), + 'filter': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['crm.Filter']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'crm.process': { + 'Meta': {'object_name': 'Process'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'start': ('django.db.models.fields.DateTimeField', [], {}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) + }, + u'crm.tag': { + 'Meta': {'object_name': 'Tag'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}) + } + } + + complete_apps = ['crm'] \ No newline at end of file diff --git a/crm/migrations/__init__.py b/crm/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/crm_accounting/migrations/0001_initial.py b/crm_accounting/migrations/0001_initial.py new file mode 100644 index 0000000..36233ab --- /dev/null +++ b/crm_accounting/migrations/0001_initial.py @@ -0,0 +1,86 @@ +# -*- coding: utf-8 -*- +import 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 'Affiliate' + db.create_table(u'crm_accounting_affiliate', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('contact', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['crm_contacts.Contact'])), + ('account', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['accounting.Account'])), + )) + db.send_create_signal(u'crm_accounting', ['Affiliate']) + + # Adding model 'AffiliateAccount' + db.create_table(u'crm_accounting_affiliateaccount', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('affiliate', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['crm_accounting.Affiliate'])), + ('iban', self.gf('django.db.models.fields.CharField')(max_length=34)), + )) + db.send_create_signal(u'crm_accounting', ['AffiliateAccount']) + + + def backwards(self, orm): + # Deleting model 'Affiliate' + db.delete_table(u'crm_accounting_affiliate') + + # Deleting model 'AffiliateAccount' + db.delete_table(u'crm_accounting_affiliateaccount') + + + models = { + u'accounting.account': { + 'Meta': {'object_name': 'Account'}, + 'code': ('django.db.models.fields.CharField', [], {'max_length': '10'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['accounting.Account']", 'null': 'True', 'blank': 'True'}) + }, + u'crm.entity': { + 'Meta': {'object_name': 'Entity'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'links': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'links_rel_+'", 'blank': 'True', 'to': u"orm['crm.Entity']"}), + 'memo': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['crm.Tag']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'crm.tag': { + 'Meta': {'object_name': 'Tag'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}) + }, + u'crm_accounting.affiliate': { + 'Meta': {'object_name': 'Affiliate'}, + 'account': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['accounting.Account']"}), + 'contact': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['crm_contacts.Contact']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + u'crm_accounting.affiliateaccount': { + 'Meta': {'object_name': 'AffiliateAccount'}, + 'affiliate': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['crm_accounting.Affiliate']"}), + 'iban': ('django.db.models.fields.CharField', [], {'max_length': '34'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + u'crm_contacts.contact': { + 'Meta': {'object_name': 'Contact', '_ormbases': [u'crm.Entity']}, + 'emails': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['crm_contacts.Email']", 'symmetrical': 'False'}), + u'entity_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['crm.Entity']", 'unique': 'True', 'primary_key': 'True'}), + 'telephoneNumbers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['crm_contacts.TelephoneNumber']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'crm_contacts.email': { + 'Meta': {'object_name': 'Email'}, + 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + u'crm_contacts.telephonenumber': { + 'Meta': {'object_name': 'TelephoneNumber'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'telephone': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}) + } + } + + complete_apps = ['crm_accounting'] \ No newline at end of file diff --git a/crm_accounting/migrations/__init__.py b/crm_accounting/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/crm_contacts/migrations/0001_initial.py b/crm_contacts/migrations/0001_initial.py new file mode 100644 index 0000000..a359b0b --- /dev/null +++ b/crm_contacts/migrations/0001_initial.py @@ -0,0 +1,136 @@ +# -*- coding: utf-8 -*- +import 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 'Contact' + db.create_table(u'crm_contacts_contact', ( + (u'entity_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['crm.Entity'], unique=True, primary_key=True)), + )) + db.send_create_signal(u'crm_contacts', ['Contact']) + + # Adding M2M table for field telephoneNumbers on 'Contact' + m2m_table_name = db.shorten_name(u'crm_contacts_contact_telephoneNumbers') + db.create_table(m2m_table_name, ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('contact', models.ForeignKey(orm[u'crm_contacts.contact'], null=False)), + ('telephonenumber', models.ForeignKey(orm[u'crm_contacts.telephonenumber'], null=False)) + )) + db.create_unique(m2m_table_name, ['contact_id', 'telephonenumber_id']) + + # Adding M2M table for field emails on 'Contact' + m2m_table_name = db.shorten_name(u'crm_contacts_contact_emails') + db.create_table(m2m_table_name, ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('contact', models.ForeignKey(orm[u'crm_contacts.contact'], null=False)), + ('email', models.ForeignKey(orm[u'crm_contacts.email'], null=False)) + )) + db.create_unique(m2m_table_name, ['contact_id', 'email_id']) + + # Adding model 'NaturalPerson' + db.create_table(u'crm_contacts_naturalperson', ( + (u'contact_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['crm_contacts.Contact'], unique=True, primary_key=True)), + ('givenName', self.gf('django.db.models.fields.CharField')(max_length=30)), + ('surName', self.gf('django.db.models.fields.CharField')(max_length=50)), + ('birthDay', self.gf('django.db.models.fields.DateField')()), + )) + db.send_create_signal(u'crm_contacts', ['NaturalPerson']) + + # Adding model 'ArtificialPerson' + db.create_table(u'crm_contacts_artificialperson', ( + (u'contact_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['crm_contacts.Contact'], unique=True, primary_key=True)), + ('legalName', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)), + ('contactGivenName', self.gf('django.db.models.fields.CharField')(max_length=50)), + ('contactSurName', self.gf('django.db.models.fields.CharField')(max_length=30)), + )) + db.send_create_signal(u'crm_contacts', ['ArtificialPerson']) + + # Adding model 'TelephoneNumber' + db.create_table(u'crm_contacts_telephonenumber', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('telephone', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)), + )) + db.send_create_signal(u'crm_contacts', ['TelephoneNumber']) + + # Adding model 'Email' + db.create_table(u'crm_contacts_email', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('email', self.gf('django.db.models.fields.EmailField')(unique=True, max_length=75)), + )) + db.send_create_signal(u'crm_contacts', ['Email']) + + + def backwards(self, orm): + # Deleting model 'Contact' + db.delete_table(u'crm_contacts_contact') + + # Removing M2M table for field telephoneNumbers on 'Contact' + db.delete_table(db.shorten_name(u'crm_contacts_contact_telephoneNumbers')) + + # Removing M2M table for field emails on 'Contact' + db.delete_table(db.shorten_name(u'crm_contacts_contact_emails')) + + # Deleting model 'NaturalPerson' + db.delete_table(u'crm_contacts_naturalperson') + + # Deleting model 'ArtificialPerson' + db.delete_table(u'crm_contacts_artificialperson') + + # Deleting model 'TelephoneNumber' + db.delete_table(u'crm_contacts_telephonenumber') + + # Deleting model 'Email' + db.delete_table(u'crm_contacts_email') + + + models = { + u'crm.entity': { + 'Meta': {'object_name': 'Entity'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'links': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'links_rel_+'", 'blank': 'True', 'to': u"orm['crm.Entity']"}), + 'memo': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['crm.Tag']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'crm.tag': { + 'Meta': {'object_name': 'Tag'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}) + }, + u'crm_contacts.artificialperson': { + 'Meta': {'object_name': 'ArtificialPerson', '_ormbases': [u'crm_contacts.Contact']}, + 'contactGivenName': ('django.db.models.fields.CharField', [], {'max_length': '50'}), + 'contactSurName': ('django.db.models.fields.CharField', [], {'max_length': '30'}), + u'contact_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['crm_contacts.Contact']", 'unique': 'True', 'primary_key': 'True'}), + 'legalName': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) + }, + u'crm_contacts.contact': { + 'Meta': {'object_name': 'Contact', '_ormbases': [u'crm.Entity']}, + 'emails': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['crm_contacts.Email']", 'symmetrical': 'False'}), + u'entity_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['crm.Entity']", 'unique': 'True', 'primary_key': 'True'}), + 'telephoneNumbers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['crm_contacts.TelephoneNumber']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'crm_contacts.email': { + 'Meta': {'object_name': 'Email'}, + 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + u'crm_contacts.naturalperson': { + 'Meta': {'object_name': 'NaturalPerson', '_ormbases': [u'crm_contacts.Contact']}, + 'birthDay': ('django.db.models.fields.DateField', [], {}), + u'contact_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['crm_contacts.Contact']", 'unique': 'True', 'primary_key': 'True'}), + 'givenName': ('django.db.models.fields.CharField', [], {'max_length': '30'}), + 'surName': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'crm_contacts.telephonenumber': { + 'Meta': {'object_name': 'TelephoneNumber'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'telephone': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}) + } + } + + complete_apps = ['crm_contacts'] \ No newline at end of file diff --git a/crm_contacts/migrations/__init__.py b/crm_contacts/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/crm_document/migrations/0001_initial.py b/crm_document/migrations/0001_initial.py new file mode 100644 index 0000000..c48afe6 --- /dev/null +++ b/crm_document/migrations/0001_initial.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +import 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 'Document' + db.create_table(u'crm_document_document', ( + (u'entity_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['crm.Entity'], unique=True, primary_key=True)), + ('name', self.gf('django.db.models.fields.CharField')(max_length=40)), + ('file', self.gf('django.db.models.fields.files.FileField')(max_length=100)), + )) + db.send_create_signal(u'crm_document', ['Document']) + + # Adding model 'Archive' + db.create_table(u'crm_document_archive', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['crm_document.Document'], unique=True)), + ('keepUntil', self.gf('django.db.models.fields.DateField')()), + )) + db.send_create_signal(u'crm_document', ['Archive']) + + + def backwards(self, orm): + # Deleting model 'Document' + db.delete_table(u'crm_document_document') + + # Deleting model 'Archive' + db.delete_table(u'crm_document_archive') + + + models = { + u'crm.entity': { + 'Meta': {'object_name': 'Entity'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'links': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'links_rel_+'", 'blank': 'True', 'to': u"orm['crm.Entity']"}), + 'memo': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['crm.Tag']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'crm.tag': { + 'Meta': {'object_name': 'Tag'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}) + }, + u'crm_document.archive': { + 'Meta': {'object_name': 'Archive'}, + 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['crm_document.Document']", 'unique': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'keepUntil': ('django.db.models.fields.DateField', [], {}) + }, + u'crm_document.document': { + 'Meta': {'object_name': 'Document', '_ormbases': [u'crm.Entity']}, + u'entity_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['crm.Entity']", 'unique': 'True', 'primary_key': 'True'}), + 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '40'}) + } + } + + complete_apps = ['crm_document'] \ No newline at end of file diff --git a/crm_document/migrations/__init__.py b/crm_document/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/crm_member/migrations/0001_initial.py b/crm_member/migrations/0001_initial.py new file mode 100644 index 0000000..755abe3 --- /dev/null +++ b/crm_member/migrations/0001_initial.py @@ -0,0 +1,81 @@ +# -*- coding: utf-8 -*- +import 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 'Membership' + db.create_table(u'crm_member_membership', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('label', self.gf('django.db.models.fields.CharField')(max_length=30)), + )) + db.send_create_signal(u'crm_member', ['Membership']) + + # Adding model 'Member' + db.create_table(u'crm_member_member', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('contact', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['crm_contacts.Contact'])), + ('membership', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['crm_member.Membership'])), + ('joinDate', self.gf('django.db.models.fields.DateField')()), + ('resignationDate', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), + )) + db.send_create_signal(u'crm_member', ['Member']) + + + def backwards(self, orm): + # Deleting model 'Membership' + db.delete_table(u'crm_member_membership') + + # Deleting model 'Member' + db.delete_table(u'crm_member_member') + + + models = { + u'crm.entity': { + 'Meta': {'object_name': 'Entity'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'links': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'links_rel_+'", 'blank': 'True', 'to': u"orm['crm.Entity']"}), + 'memo': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['crm.Tag']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'crm.tag': { + 'Meta': {'object_name': 'Tag'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}) + }, + u'crm_contacts.contact': { + 'Meta': {'object_name': 'Contact', '_ormbases': [u'crm.Entity']}, + 'emails': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['crm_contacts.Email']", 'symmetrical': 'False'}), + u'entity_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['crm.Entity']", 'unique': 'True', 'primary_key': 'True'}), + 'telephoneNumbers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['crm_contacts.TelephoneNumber']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'crm_contacts.email': { + 'Meta': {'object_name': 'Email'}, + 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + u'crm_contacts.telephonenumber': { + 'Meta': {'object_name': 'TelephoneNumber'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'telephone': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}) + }, + u'crm_member.member': { + 'Meta': {'object_name': 'Member'}, + 'contact': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['crm_contacts.Contact']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'joinDate': ('django.db.models.fields.DateField', [], {}), + 'membership': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['crm_member.Membership']"}), + 'resignationDate': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}) + }, + u'crm_member.membership': { + 'Meta': {'object_name': 'Membership'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}) + } + } + + complete_apps = ['crm_member'] \ No newline at end of file diff --git a/crm_member/migrations/__init__.py b/crm_member/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/vpanel2/settings.py b/vpanel2/settings.py index 2abc9c3..63ef52a 100644 --- a/vpanel2/settings.py +++ b/vpanel2/settings.py @@ -120,6 +120,7 @@ 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', + 'south', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', 'crm',