2013-01-02 19:42:16 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import datetime
|
|
|
|
from south.db import db
|
|
|
|
from south.v2 import SchemaMigration
|
|
|
|
from django.db import models
|
2013-05-06 18:24:47 +02:00
|
|
|
from django.conf import settings
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
class Migration(SchemaMigration):
|
|
|
|
|
|
|
|
def forwards(self, orm):
|
|
|
|
# Adding model 'Realm'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_table(u'zephyr_realm', (
|
|
|
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
('domain', self.gf('django.db.models.fields.CharField')(unique=True, max_length=40, db_index=True)),
|
2013-05-06 18:24:47 +02:00
|
|
|
('restricted_to_domain', self.gf('django.db.models.fields.BooleanField')(default=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
))
|
2013-05-06 18:24:47 +02:00
|
|
|
db.send_create_signal(u'zephyr', ['Realm'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding model 'UserProfile'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_table(u'zephyr_userprofile', (
|
|
|
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
|
|
|
('password', self.gf('django.db.models.fields.CharField')(max_length=128)),
|
|
|
|
('last_login', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
|
|
|
|
('email', self.gf('django.db.models.fields.EmailField')(max_length=75, blank=True)),
|
|
|
|
('is_staff', self.gf('django.db.models.fields.BooleanField')(default=False)),
|
|
|
|
('is_active', self.gf('django.db.models.fields.BooleanField')(default=True)),
|
|
|
|
('date_joined', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
|
2013-01-02 19:42:16 +01:00
|
|
|
('full_name', self.gf('django.db.models.fields.CharField')(max_length=100)),
|
|
|
|
('short_name', self.gf('django.db.models.fields.CharField')(max_length=100)),
|
|
|
|
('pointer', self.gf('django.db.models.fields.IntegerField')()),
|
|
|
|
('last_pointer_updater', self.gf('django.db.models.fields.CharField')(max_length=64)),
|
|
|
|
('realm', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.Realm'])),
|
|
|
|
('api_key', self.gf('django.db.models.fields.CharField')(max_length=32)),
|
|
|
|
('enable_desktop_notifications', self.gf('django.db.models.fields.BooleanField')(default=True)),
|
2013-05-06 18:24:47 +02:00
|
|
|
('enter_sends', self.gf('django.db.models.fields.NullBooleanField')(default=False, null=True, blank=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
))
|
2013-05-06 18:24:47 +02:00
|
|
|
db.send_create_signal(u'zephyr', ['UserProfile'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding model 'PreregistrationUser'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_table(u'zephyr_preregistrationuser', (
|
|
|
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
|
|
|
('email', self.gf('django.db.models.fields.EmailField')(max_length=75)),
|
|
|
|
('referred_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.UserProfile'], null=True)),
|
|
|
|
('invited_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
('status', self.gf('django.db.models.fields.IntegerField')(default=0)),
|
|
|
|
))
|
2013-05-06 18:24:47 +02:00
|
|
|
db.send_create_signal(u'zephyr', ['PreregistrationUser'])
|
|
|
|
|
|
|
|
# Adding M2M table for field streams on 'PreregistrationUser'
|
|
|
|
db.create_table(u'zephyr_preregistrationuser_streams', (
|
|
|
|
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
|
|
|
|
('preregistrationuser', models.ForeignKey(orm[u'zephyr.preregistrationuser'], null=False)),
|
|
|
|
('stream', models.ForeignKey(orm[u'zephyr.stream'], null=False))
|
|
|
|
))
|
|
|
|
db.create_unique(u'zephyr_preregistrationuser_streams', ['preregistrationuser_id', 'stream_id'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding model 'MitUser'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_table(u'zephyr_mituser', (
|
|
|
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
('email', self.gf('django.db.models.fields.EmailField')(unique=True, max_length=75)),
|
|
|
|
('status', self.gf('django.db.models.fields.IntegerField')(default=0)),
|
|
|
|
))
|
2013-05-06 18:24:47 +02:00
|
|
|
db.send_create_signal(u'zephyr', ['MitUser'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding model 'Stream'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_table(u'zephyr_stream', (
|
|
|
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
('name', self.gf('django.db.models.fields.CharField')(max_length=30, db_index=True)),
|
|
|
|
('realm', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.Realm'])),
|
2013-05-06 18:24:47 +02:00
|
|
|
('invite_only', self.gf('django.db.models.fields.NullBooleanField')(default=False, null=True, blank=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
))
|
2013-05-06 18:24:47 +02:00
|
|
|
db.send_create_signal(u'zephyr', ['Stream'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding unique constraint on 'Stream', fields ['name', 'realm']
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_unique(u'zephyr_stream', ['name', 'realm_id'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding model 'Recipient'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_table(u'zephyr_recipient', (
|
|
|
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
('type_id', self.gf('django.db.models.fields.IntegerField')(db_index=True)),
|
|
|
|
('type', self.gf('django.db.models.fields.PositiveSmallIntegerField')(db_index=True)),
|
|
|
|
))
|
2013-05-06 18:24:47 +02:00
|
|
|
db.send_create_signal(u'zephyr', ['Recipient'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding unique constraint on 'Recipient', fields ['type', 'type_id']
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_unique(u'zephyr_recipient', ['type', 'type_id'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding model 'Client'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_table(u'zephyr_client', (
|
|
|
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30, db_index=True)),
|
|
|
|
))
|
2013-05-06 18:24:47 +02:00
|
|
|
db.send_create_signal(u'zephyr', ['Client'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding model 'Message'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_table(u'zephyr_message', (
|
|
|
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
('sender', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.UserProfile'])),
|
|
|
|
('recipient', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.Recipient'])),
|
|
|
|
('subject', self.gf('django.db.models.fields.CharField')(max_length=60, db_index=True)),
|
|
|
|
('content', self.gf('django.db.models.fields.TextField')()),
|
2013-05-06 18:24:47 +02:00
|
|
|
('rendered_content', self.gf('django.db.models.fields.TextField')(null=True)),
|
|
|
|
('rendered_content_version', self.gf('django.db.models.fields.IntegerField')(null=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
('pub_date', self.gf('django.db.models.fields.DateTimeField')(db_index=True)),
|
|
|
|
('sending_client', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.Client'])),
|
|
|
|
))
|
2013-05-06 18:24:47 +02:00
|
|
|
db.send_create_signal(u'zephyr', ['Message'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding model 'UserMessage'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_table(u'zephyr_usermessage', (
|
|
|
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
('user_profile', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.UserProfile'])),
|
|
|
|
('message', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.Message'])),
|
|
|
|
('archived', self.gf('django.db.models.fields.BooleanField')(default=False)),
|
2013-05-06 18:24:47 +02:00
|
|
|
('flags', self.gf('django.db.models.fields.BigIntegerField')(default=0)),
|
2013-01-02 19:42:16 +01:00
|
|
|
))
|
2013-05-06 18:24:47 +02:00
|
|
|
db.send_create_signal(u'zephyr', ['UserMessage'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding unique constraint on 'UserMessage', fields ['user_profile', 'message']
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_unique(u'zephyr_usermessage', ['user_profile_id', 'message_id'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding model 'Subscription'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_table(u'zephyr_subscription', (
|
|
|
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
('user_profile', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.UserProfile'])),
|
|
|
|
('recipient', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.Recipient'])),
|
|
|
|
('active', self.gf('django.db.models.fields.BooleanField')(default=True)),
|
2013-05-06 18:24:47 +02:00
|
|
|
('in_home_view', self.gf('django.db.models.fields.NullBooleanField')(default=True, null=True, blank=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
))
|
2013-05-06 18:24:47 +02:00
|
|
|
db.send_create_signal(u'zephyr', ['Subscription'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding unique constraint on 'Subscription', fields ['user_profile', 'recipient']
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_unique(u'zephyr_subscription', ['user_profile_id', 'recipient_id'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding model 'Huddle'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_table(u'zephyr_huddle', (
|
|
|
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
('huddle_hash', self.gf('django.db.models.fields.CharField')(unique=True, max_length=40, db_index=True)),
|
|
|
|
))
|
2013-05-06 18:24:47 +02:00
|
|
|
db.send_create_signal(u'zephyr', ['Huddle'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding model 'UserActivity'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_table(u'zephyr_useractivity', (
|
|
|
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
('user_profile', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.UserProfile'])),
|
|
|
|
('client', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.Client'])),
|
|
|
|
('query', self.gf('django.db.models.fields.CharField')(max_length=50, db_index=True)),
|
|
|
|
('count', self.gf('django.db.models.fields.IntegerField')()),
|
|
|
|
('last_visit', self.gf('django.db.models.fields.DateTimeField')()),
|
|
|
|
))
|
2013-05-06 18:24:47 +02:00
|
|
|
db.send_create_signal(u'zephyr', ['UserActivity'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding unique constraint on 'UserActivity', fields ['user_profile', 'client', 'query']
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_unique(u'zephyr_useractivity', ['user_profile_id', 'client_id', 'query'])
|
|
|
|
|
|
|
|
# Adding model 'UserPresence'
|
|
|
|
db.create_table(u'zephyr_userpresence', (
|
|
|
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
|
|
|
('user_profile', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.UserProfile'])),
|
|
|
|
('client', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.Client'])),
|
|
|
|
('timestamp', self.gf('django.db.models.fields.DateTimeField')()),
|
|
|
|
('status', self.gf('django.db.models.fields.PositiveSmallIntegerField')(default=1)),
|
|
|
|
))
|
|
|
|
db.send_create_signal(u'zephyr', ['UserPresence'])
|
|
|
|
|
|
|
|
# Adding unique constraint on 'UserPresence', fields ['user_profile', 'client']
|
|
|
|
db.create_unique(u'zephyr_userpresence', ['user_profile_id', 'client_id'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding model 'DefaultStream'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_table(u'zephyr_defaultstream', (
|
|
|
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
('realm', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.Realm'])),
|
|
|
|
('stream', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.Stream'])),
|
|
|
|
))
|
2013-05-06 18:24:47 +02:00
|
|
|
db.send_create_signal(u'zephyr', ['DefaultStream'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding unique constraint on 'DefaultStream', fields ['realm', 'stream']
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_unique(u'zephyr_defaultstream', ['realm_id', 'stream_id'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Adding model 'StreamColor'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.create_table(u'zephyr_streamcolor', (
|
|
|
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
2013-01-02 19:42:16 +01:00
|
|
|
('subscription', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['zephyr.Subscription'])),
|
|
|
|
('color', self.gf('django.db.models.fields.CharField')(max_length=10)),
|
|
|
|
))
|
2013-05-06 18:24:47 +02:00
|
|
|
db.send_create_signal(u'zephyr', ['StreamColor'])
|
|
|
|
|
|
|
|
if "postgres" not in settings.DATABASES["default"]["ENGINE"]:
|
|
|
|
return
|
|
|
|
# we do not populate search_tsvector, as the data which you'd normally populate it is empty (which would be a NO-OP).
|
|
|
|
# Also, we populate it in a later migration.
|
|
|
|
db.execute("ALTER TABLE zephyr_message ADD COLUMN search_tsvector tsvector")
|
|
|
|
if len(db.execute("""SELECT relname FROM pg_class
|
|
|
|
WHERE relname = 'zephyr_message_search_tsvector'""")) != 0:
|
|
|
|
print "Not creating index because it already exists"
|
|
|
|
else:
|
|
|
|
db.execute("""CREATE INDEX zephyr_message_search_tsvector ON zephyr_message
|
|
|
|
USING gin(search_tsvector)""")
|
|
|
|
db.execute("""CREATE TRIGGER zephyr_message_update_search_tsvector
|
|
|
|
BEFORE INSERT OR UPDATE ON zephyr_message FOR EACH ROW
|
|
|
|
EXECUTE PROCEDURE tsvector_update_trigger(search_tsvector,
|
|
|
|
'pg_catalog.english', subject, content)""");
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
def backwards(self, orm):
|
|
|
|
# Removing unique constraint on 'DefaultStream', fields ['realm', 'stream']
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_unique(u'zephyr_defaultstream', ['realm_id', 'stream_id'])
|
|
|
|
|
|
|
|
# Removing unique constraint on 'UserPresence', fields ['user_profile', 'client']
|
|
|
|
db.delete_unique(u'zephyr_userpresence', ['user_profile_id', 'client_id'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Removing unique constraint on 'UserActivity', fields ['user_profile', 'client', 'query']
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_unique(u'zephyr_useractivity', ['user_profile_id', 'client_id', 'query'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Removing unique constraint on 'Subscription', fields ['user_profile', 'recipient']
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_unique(u'zephyr_subscription', ['user_profile_id', 'recipient_id'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Removing unique constraint on 'UserMessage', fields ['user_profile', 'message']
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_unique(u'zephyr_usermessage', ['user_profile_id', 'message_id'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Removing unique constraint on 'Recipient', fields ['type', 'type_id']
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_unique(u'zephyr_recipient', ['type', 'type_id'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Removing unique constraint on 'Stream', fields ['name', 'realm']
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_unique(u'zephyr_stream', ['name', 'realm_id'])
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Deleting model 'Realm'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_table(u'zephyr_realm')
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Deleting model 'UserProfile'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_table(u'zephyr_userprofile')
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Deleting model 'PreregistrationUser'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_table(u'zephyr_preregistrationuser')
|
|
|
|
|
|
|
|
# Removing M2M table for field streams on 'PreregistrationUser'
|
|
|
|
db.delete_table('zephyr_preregistrationuser_streams')
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Deleting model 'MitUser'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_table(u'zephyr_mituser')
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Deleting model 'Stream'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_table(u'zephyr_stream')
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Deleting model 'Recipient'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_table(u'zephyr_recipient')
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Deleting model 'Client'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_table(u'zephyr_client')
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Deleting model 'Message'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_table(u'zephyr_message')
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Deleting model 'UserMessage'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_table(u'zephyr_usermessage')
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Deleting model 'Subscription'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_table(u'zephyr_subscription')
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Deleting model 'Huddle'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_table(u'zephyr_huddle')
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Deleting model 'UserActivity'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_table(u'zephyr_useractivity')
|
|
|
|
|
|
|
|
# Deleting model 'UserPresence'
|
|
|
|
db.delete_table(u'zephyr_userpresence')
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Deleting model 'DefaultStream'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_table(u'zephyr_defaultstream')
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
# Deleting model 'StreamColor'
|
2013-05-06 18:24:47 +02:00
|
|
|
db.delete_table(u'zephyr_streamcolor')
|
2013-01-02 19:42:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
models = {
|
2013-05-06 18:24:47 +02:00
|
|
|
u'zephyr.client': {
|
2013-01-02 19:42:16 +01:00
|
|
|
'Meta': {'object_name': 'Client'},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
2013-01-02 19:42:16 +01:00
|
|
|
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30', 'db_index': 'True'})
|
|
|
|
},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'zephyr.defaultstream': {
|
2013-01-02 19:42:16 +01:00
|
|
|
'Meta': {'unique_together': "(('realm', 'stream'),)", 'object_name': 'DefaultStream'},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
|
|
|
'realm': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.Realm']"}),
|
|
|
|
'stream': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.Stream']"})
|
2013-01-02 19:42:16 +01:00
|
|
|
},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'zephyr.huddle': {
|
2013-01-02 19:42:16 +01:00
|
|
|
'Meta': {'object_name': 'Huddle'},
|
|
|
|
'huddle_hash': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40', 'db_index': 'True'}),
|
2013-05-06 18:24:47 +02:00
|
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
|
2013-01-02 19:42:16 +01:00
|
|
|
},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'zephyr.message': {
|
2013-01-02 19:42:16 +01:00
|
|
|
'Meta': {'object_name': 'Message'},
|
|
|
|
'content': ('django.db.models.fields.TextField', [], {}),
|
2013-05-06 18:24:47 +02:00
|
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
2013-01-02 19:42:16 +01:00
|
|
|
'pub_date': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
|
2013-05-06 18:24:47 +02:00
|
|
|
'recipient': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.Recipient']"}),
|
|
|
|
'rendered_content': ('django.db.models.fields.TextField', [], {'null': 'True'}),
|
|
|
|
'rendered_content_version': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
|
|
|
|
'sender': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.UserProfile']"}),
|
|
|
|
'sending_client': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.Client']"}),
|
2013-01-02 19:42:16 +01:00
|
|
|
'subject': ('django.db.models.fields.CharField', [], {'max_length': '60', 'db_index': 'True'})
|
|
|
|
},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'zephyr.mituser': {
|
2013-01-02 19:42:16 +01:00
|
|
|
'Meta': {'object_name': 'MitUser'},
|
|
|
|
'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),
|
2013-05-06 18:24:47 +02:00
|
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
2013-01-02 19:42:16 +01:00
|
|
|
'status': ('django.db.models.fields.IntegerField', [], {'default': '0'})
|
|
|
|
},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'zephyr.preregistrationuser': {
|
2013-01-02 19:42:16 +01:00
|
|
|
'Meta': {'object_name': 'PreregistrationUser'},
|
2013-05-06 18:24:47 +02:00
|
|
|
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
|
|
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
|
|
|
'invited_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
|
|
|
'referred_by': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.UserProfile']", 'null': 'True'}),
|
|
|
|
'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
|
|
|
|
'streams': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['zephyr.Stream']", 'null': 'True', 'symmetrical': 'False'})
|
2013-01-02 19:42:16 +01:00
|
|
|
},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'zephyr.realm': {
|
2013-01-02 19:42:16 +01:00
|
|
|
'Meta': {'object_name': 'Realm'},
|
|
|
|
'domain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40', 'db_index': 'True'}),
|
2013-05-06 18:24:47 +02:00
|
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
|
|
|
'restricted_to_domain': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
|
2013-01-02 19:42:16 +01:00
|
|
|
},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'zephyr.recipient': {
|
2013-01-02 19:42:16 +01:00
|
|
|
'Meta': {'unique_together': "(('type', 'type_id'),)", 'object_name': 'Recipient'},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
2013-01-02 19:42:16 +01:00
|
|
|
'type': ('django.db.models.fields.PositiveSmallIntegerField', [], {'db_index': 'True'}),
|
|
|
|
'type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'})
|
|
|
|
},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'zephyr.stream': {
|
2013-01-02 19:42:16 +01:00
|
|
|
'Meta': {'unique_together': "(('name', 'realm'),)", 'object_name': 'Stream'},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
|
|
|
'invite_only': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}),
|
2013-01-02 19:42:16 +01:00
|
|
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'db_index': 'True'}),
|
2013-05-06 18:24:47 +02:00
|
|
|
'realm': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.Realm']"})
|
2013-01-02 19:42:16 +01:00
|
|
|
},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'zephyr.streamcolor': {
|
2013-01-02 19:42:16 +01:00
|
|
|
'Meta': {'object_name': 'StreamColor'},
|
|
|
|
'color': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
|
2013-05-06 18:24:47 +02:00
|
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
|
|
|
'subscription': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.Subscription']"})
|
2013-01-02 19:42:16 +01:00
|
|
|
},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'zephyr.subscription': {
|
2013-01-02 19:42:16 +01:00
|
|
|
'Meta': {'unique_together': "(('user_profile', 'recipient'),)", 'object_name': 'Subscription'},
|
|
|
|
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
2013-05-06 18:24:47 +02:00
|
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
|
|
|
'in_home_view': ('django.db.models.fields.NullBooleanField', [], {'default': 'True', 'null': 'True', 'blank': 'True'}),
|
|
|
|
'recipient': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.Recipient']"}),
|
|
|
|
'user_profile': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.UserProfile']"})
|
2013-01-02 19:42:16 +01:00
|
|
|
},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'zephyr.useractivity': {
|
2013-01-02 19:42:16 +01:00
|
|
|
'Meta': {'unique_together': "(('user_profile', 'client', 'query'),)", 'object_name': 'UserActivity'},
|
2013-05-06 18:24:47 +02:00
|
|
|
'client': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.Client']"}),
|
2013-01-02 19:42:16 +01:00
|
|
|
'count': ('django.db.models.fields.IntegerField', [], {}),
|
2013-05-06 18:24:47 +02:00
|
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
2013-01-02 19:42:16 +01:00
|
|
|
'last_visit': ('django.db.models.fields.DateTimeField', [], {}),
|
|
|
|
'query': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
|
2013-05-06 18:24:47 +02:00
|
|
|
'user_profile': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.UserProfile']"})
|
2013-01-02 19:42:16 +01:00
|
|
|
},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'zephyr.usermessage': {
|
2013-01-02 19:42:16 +01:00
|
|
|
'Meta': {'unique_together': "(('user_profile', 'message'),)", 'object_name': 'UserMessage'},
|
|
|
|
'archived': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
2013-05-06 18:24:47 +02:00
|
|
|
'flags': ('django.db.models.fields.BigIntegerField', [], {'default': '0'}),
|
|
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
|
|
|
'message': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.Message']"}),
|
|
|
|
'user_profile': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.UserProfile']"})
|
|
|
|
},
|
|
|
|
u'zephyr.userpresence': {
|
|
|
|
'Meta': {'unique_together': "(('user_profile', 'client'),)", 'object_name': 'UserPresence'},
|
|
|
|
'client': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.Client']"}),
|
|
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
|
|
|
'status': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '1'}),
|
|
|
|
'timestamp': ('django.db.models.fields.DateTimeField', [], {}),
|
|
|
|
'user_profile': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.UserProfile']"})
|
2013-01-02 19:42:16 +01:00
|
|
|
},
|
2013-05-06 18:24:47 +02:00
|
|
|
u'zephyr.userprofile': {
|
2013-01-02 19:42:16 +01:00
|
|
|
'Meta': {'object_name': 'UserProfile'},
|
|
|
|
'api_key': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
|
2013-05-06 18:24:47 +02:00
|
|
|
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
|
|
|
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
2013-01-02 19:42:16 +01:00
|
|
|
'enable_desktop_notifications': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
2013-05-06 18:24:47 +02:00
|
|
|
'enter_sends': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}),
|
2013-01-02 19:42:16 +01:00
|
|
|
'full_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
2013-05-06 18:24:47 +02:00
|
|
|
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'}),
|
|
|
|
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
2013-01-02 19:42:16 +01:00
|
|
|
'last_pointer_updater': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
|
2013-05-06 18:24:47 +02:00
|
|
|
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
|
2013-01-02 19:42:16 +01:00
|
|
|
'pointer': ('django.db.models.fields.IntegerField', [], {}),
|
2013-05-06 18:24:47 +02:00
|
|
|
'realm': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zephyr.Realm']"}),
|
|
|
|
'short_name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
|
2013-01-02 19:42:16 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-05-06 18:24:47 +02:00
|
|
|
complete_apps = ['zephyr']
|