def forwards(self, orm):
        # Adding model 'DesLookbook'
        db.create_table(u'catalogue_deslookbook', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('designer', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['designer.Designer'], null=True, blank=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=128, unique=True, null=True)),
            ('description', self.gf('django.db.models.fields.TextField')()),
        ))
        db.send_create_signal(u'catalogue', ['DesLookbook'])

        # Adding M2M table for field products on 'DesLookbook'
        m2m_table_name = db.shorten_name(u'catalogue_deslookbook_products')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('deslookbook', models.ForeignKey(orm[u'catalogue.deslookbook'], null=False)),
            ('product', models.ForeignKey(orm[u'catalogue.product'], null=False))
        ))
        db.create_unique(m2m_table_name, ['deslookbook_id', 'product_id'])

        # Adding field 'Product.designer'
        db.add_column(u'catalogue_product', 'designer',
                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['designer.Designer'], null=True, blank=True),
                      keep_default=False)

        # Adding field 'Product.video'
        db.add_column(u'catalogue_product', 'video',
                      self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True, blank=True),
                      keep_default=False)
コード例 #2
0
ファイル: 0002_subscriptions.py プロジェクト: lohrun/weblate
    def forwards(self, orm):
        # Adding field 'Profile.subscribe_any_translation'
        db.add_column('accounts_profile', 'subscribe_any_translation',
                      self.gf('django.db.models.fields.BooleanField')(default=False),
                      keep_default=False)

        # Adding field 'Profile.subscribe_new_string'
        db.add_column('accounts_profile', 'subscribe_new_string',
                      self.gf('django.db.models.fields.BooleanField')(default=False),
                      keep_default=False)

        # Adding field 'Profile.subscribe_new_suggestion'
        db.add_column('accounts_profile', 'subscribe_new_suggestion',
                      self.gf('django.db.models.fields.BooleanField')(default=False),
                      keep_default=False)

        # Adding field 'Profile.subscribe_new_contributor'
        db.add_column('accounts_profile', 'subscribe_new_contributor',
                      self.gf('django.db.models.fields.BooleanField')(default=False),
                      keep_default=False)

        # Adding M2M table for field subscriptions on 'Profile'
        db.create_table('accounts_profile_subscriptions', (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('profile', models.ForeignKey(orm['accounts.profile'], null=False)),
            ('project', models.ForeignKey(orm['trans.project'], null=False))
        ))
        db.create_unique('accounts_profile_subscriptions', ['profile_id', 'project_id'])
コード例 #3
0
ファイル: 0003_initial.py プロジェクト: sbuggay/soletrakr
 def forwards(self, orm):
     # Adding model 'Device'
     db.create_table(u'devices_device', (
         (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
         ('given_name', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
         ('poll_rate', self.gf('django.db.models.fields.IntegerField')(default=60)),
         ('user', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='devices', null=True, to=orm['auth.User'])),
         ('serial_number', self.gf('django.db.models.fields.IntegerField')(unique=True)),
         ('sim_serial_number', self.gf('django.db.models.fields.IntegerField')(unique=True)),
         ('date_manufactured', self.gf('django.db.models.fields.DateField')()),
         ('date_activated', self.gf('django.db.models.fields.DateField')(null=True, blank=True)),
         ('phone_number', self.gf('django_localflavor_us.models.PhoneNumberField')(max_length=20, blank=True)),
         ('location', self.gf('django.contrib.gis.db.models.fields.PointField')(null=True, blank=True)),
         ('battery_life', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
         ('is_charging', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)),
         ('temperature', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)),
         ('operating_current', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)),
         ('power_mode', self.gf('django.db.models.fields.CharField')(max_length=4, null=True, blank=True)),
         ('signal_strength', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)),
         ('gps_activated', self.gf('django.db.models.fields.BooleanField')(default=False)),
         ('gps_satellite_count', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
         ('last_request', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
         ('is_active', self.gf('django.db.models.fields.BooleanField')(default=False)),
     ))
     db.send_create_signal(u'devices', ['Device'])
コード例 #4
0
ファイル: 0001_initial.py プロジェクト: acfrmarine/squidle
    def forwards(self, orm):
        # Adding model 'Collection'
        db.create_table('collection_collection', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
            ('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
            ('creation_date', self.gf('django.db.models.fields.DateTimeField')()),
            ('modified_date', self.gf('django.db.models.fields.DateTimeField')()),
            ('is_public', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('is_locked', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['collection.Collection'], null=True, blank=True)),
            ('creation_info', self.gf('django.db.models.fields.CharField')(max_length=200)),
        ))
        db.send_create_signal('collection', ['Collection'])

        # Adding unique constraint on 'Collection', fields ['owner', 'name']
        db.create_unique('collection_collection', ['owner_id', 'name'])

        # Adding M2M table for field images on 'Collection'
        db.create_table('collection_collection_images', (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('collection', models.ForeignKey(orm['collection.collection'], null=False)),
            ('image', models.ForeignKey(orm['catamidb.image'], null=False))
        ))
        db.create_unique('collection_collection_images', ['collection_id', 'image_id'])
コード例 #5
0
ファイル: 0001_initial.py プロジェクト: cjmartin/thisismycam
    def forwards(self, orm):
        # Adding model 'UserProfile'
        db.create_table('accounts_userprofile', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)),
            ('flickr_nsid', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
            ('flickr_username', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
            ('flickr_fullname', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
            ('flickr_oauth_token', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
            ('flickr_oauth_token_secret', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
            ('flickr_user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['flickr.FlickrUser'], unique=True, null=True, blank=True)),
            ('date_create', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
            ('date_update', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
        ))
        db.send_create_signal('accounts', ['UserProfile'])

        # Adding model 'FlickrContact'
        db.create_table('accounts_flickrcontact', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['accounts.UserProfile'])),
            ('flickr_user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['flickr.FlickrUser'])),
            ('friend', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('family', self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('accounts', ['FlickrContact'])
コード例 #6
0
    def forwards(self, orm):

        # Adding model 'ExerciseWidget'
        db.create_table('askbot_exercisewidget', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('title', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('exercise_number', self.gf('django.db.models.fields.PositiveIntegerField')(default=7)),
            ('tagnames', self.gf('django.db.models.fields.CharField')(max_length=50)),
            ('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['askbot.Tag'], null=True, blank=True)),
            ('search_query', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True, default='')),
            ('order_by', self.gf('django.db.models.fields.CharField')(default='-added_at', max_length=18)),
            ('style', self.gf('django.db.models.fields.TextField')(default='', blank=True, null=True)),
        ))
        db.send_create_signal('askbot', ['ExerciseWidget'])

        # Adding model 'AskWidget'
        db.create_table('askbot_askwidget', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('title', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('group', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='groups', null=True, to=orm['askbot.Tag'])),
            ('tag', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['askbot.Tag'], null=True, blank=True)),
            ('include_text_field', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('inner_style', self.gf('django.db.models.fields.TextField')(default='', blank=True)),
            ('outer_style', self.gf('django.db.models.fields.TextField')(default='', blank=True)),
        ))
        db.send_create_signal('askbot', ['AskWidget'])
    def forwards(self, orm):
        # Adding model 'ProjectVideo'
        db.create_table(u'projects_projectvideo', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('video', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['videos.Video'])),
            ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['projects.Project'])),
        ))
        db.send_create_signal(u'projects', ['ProjectVideo'])

        # Adding field 'Project.contractor'
        db.add_column(u'projects_project', 'contractor',
                      self.gf('django.db.models.fields.CharField')(max_length=400, null=True, blank=True),
                      keep_default=False)


        # Changing field 'Project.location_name'
        db.alter_column(u'projects_project', 'location_name', self.gf('django.db.models.fields.CharField')(max_length=400, null=True))

        # Changing field 'Project.estimated_cost'
        db.alter_column(u'projects_project', 'estimated_cost', self.gf('django.db.models.fields.FloatField')(null=True))

        # Changing field 'Project.summary'
        db.alter_column(u'projects_project', 'summary', self.gf('django.db.models.fields.TextField')(null=True))

        # Changing field 'Project.total_cost'
        db.alter_column(u'projects_project', 'total_cost', self.gf('django.db.models.fields.FloatField')(null=True))
    def forwards(self, orm):
        
        # Deleting model 'NodeProductReports'
        db.delete_table('ilsgateway_nodeproductreports')

        # Adding model 'NodeProductReport'
        db.create_table('ilsgateway_nodeproductreport', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('product', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ilsgateway.Product'])),
            ('node', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ilsgateway.Node'])),
            ('report_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ilsgateway.ProductReportType'])),
            ('quantity', self.gf('django.db.models.fields.IntegerField')()),
        ))
        db.send_create_signal('ilsgateway', ['NodeProductReport'])

        # Removing M2M table for field child_nodes on 'Node'
        db.delete_table('ilsgateway_node_child_nodes')

        # Adding M2M table for field child_node on 'Node'
        db.create_table('ilsgateway_node_child_node', (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('from_node', models.ForeignKey(orm['ilsgateway.node'], null=False)),
            ('to_node', models.ForeignKey(orm['ilsgateway.node'], null=False))
        ))
        db.create_unique('ilsgateway_node_child_node', ['from_node_id', 'to_node_id'])
コード例 #9
0
    def forwards(self, orm):
        # Adding model 'CalendarGroup'
        db.create_table('schedule_calendargroup', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=40)),
            ('color', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.Color'])),
        ))
        db.send_create_signal('schedule', ['CalendarGroup'])

        # Adding M2M table for field members on 'CalendarGroup'
        db.create_table('schedule_calendargroup_members', (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('calendargroup', models.ForeignKey(orm['schedule.calendargroup'], null=False)),
            ('user', models.ForeignKey(orm['auth.user'], null=False))
        ))
        db.create_unique('schedule_calendargroup_members', ['calendargroup_id', 'user_id'])

        # Adding field 'Event.group'
        db.add_column('schedule_event', 'group',
                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['schedule.CalendarGroup'], null=True, blank=True),
                      keep_default=False)


        # Changing field 'Event.calendar'
        db.alter_column('schedule_event', 'calendar_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['schedule.Calendar'], null=True))
コード例 #10
0
    def forwards(self, orm):
        # Adding model 'UserProfile'
        db.create_table(u'profiles_userprofile', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)),
            ('date_of_birth', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
            ('sex', self.gf('django.db.models.fields.CharField')(max_length=1, null=True, blank=True)),
            ('social_security_number', self.gf('django.db.models.fields.CharField')(max_length=11, null=True, blank=True)),
            ('state_id_number', self.gf('django.db.models.fields.CharField')(max_length=8, null=True, blank=True)),
            ('phone_number', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)),
            ('parent_phone_number', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)),
            ('address', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['schools.Address'], null=True, blank=True)),
            ('school', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['schools.School'], null=True, blank=True)),
            ('school_class', self.gf('django.db.models.fields.CharField')(max_length=20, null=True, blank=True)),
            ('classlevel', self.gf('django.db.models.fields.CharField')(max_length=2, null=True, blank=True)),
        ))
        db.send_create_signal(u'profiles', ['UserProfile'])

        # Adding model 'OrganizerProfile'
        db.create_table(u'profiles_organizerprofile', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)),
            ('motto', self.gf('django.db.models.fields.CharField')(max_length=250, null=True, blank=True)),
        ))
        db.send_create_signal(u'profiles', ['OrganizerProfile'])
 def forwards(self, orm):
     # Adding model 'ConsiglioComunaleEvent'
     db.create_table('pages4gov_consigliocomunaleevent', (
         ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
         ('keywords_string', self.gf('django.db.models.fields.CharField')(blank=True, max_length=500)),
         ('site', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['sites.Site'])),
         ('title', self.gf('django.db.models.fields.CharField')(max_length=500)),
         ('slug', self.gf('django.db.models.fields.CharField')(null=True, max_length=2000, blank=True)),
         ('_meta_title', self.gf('django.db.models.fields.CharField')(null=True, max_length=500, blank=True)),
         ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
         ('gen_description', self.gf('django.db.models.fields.BooleanField')(default=True)),
         ('created', self.gf('django.db.models.fields.DateTimeField')(null=True)),
         ('updated', self.gf('django.db.models.fields.DateTimeField')(null=True)),
         ('status', self.gf('django.db.models.fields.IntegerField')(default=2)),
         ('publish_date', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
         ('expiry_date', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
         ('short_url', self.gf('django.db.models.fields.URLField')(null=True, max_length=200, blank=True)),
         ('in_sitemap', self.gf('django.db.models.fields.BooleanField')(default=True)),
         ('content', self.gf('mezzanine.core.fields.RichTextField')()),
         ('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='consigliocomunaleevents', to=orm['auth.User'])),
         ('data_of_performance', self.gf('django.db.models.fields.DateTimeField')()),
         ('news_url', self.gf('django.db.models.fields.URLField')(blank=True, max_length=200)),
         ('youtube_video_url', self.gf('django.db.models.fields.URLField')(blank=True, max_length=200)),
         ('youtube_video_url_query', self.gf('django.db.models.fields.CharField')(blank=True, max_length=200)),
         ('hangout_url', self.gf('django.db.models.fields.URLField')(blank=True, max_length=200)),
     ))
     db.send_create_signal('pages4gov', ['ConsiglioComunaleEvent'])
    def backwards(self, orm):
        # Adding model 'Customer'
        db.create_table(u'attendees_customer', (
            ('conference', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['conference.Conference'], null=True, on_delete=models.PROTECT)),
            ('is_exported', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('email', self.gf('django.db.models.fields.EmailField')(max_length=250)),
            ('date_added', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
            ('customer_number', self.gf('django.db.models.fields.IntegerField')(blank=True)),
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
        ))
        db.send_create_signal(u'attendees', ['Customer'])

        # Adding unique constraint on 'Customer', fields ['customer_number', 'conference']
        db.create_unique(u'attendees_customer', ['customer_number', 'conference_id'])


        # User chose to not deal with backwards NULL issues for 'Purchase.customer'
        raise RuntimeError("Cannot reverse this migration. 'Purchase.customer' and its values cannot be restored.")
        
        # The following code is provided here to aid in writing a correct migration        # Adding field 'Purchase.customer'
        db.add_column(u'attendees_purchase', 'customer',
                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['attendees.Customer']),
                      keep_default=False)

        # Deleting field 'Purchase.email'
        db.delete_column(u'attendees_purchase', 'email')
    def forwards(self, orm):
        # Adding model 'DynamicPage'
        db.create_table(u'main_dynamicpage', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)),
            ('template', self.gf('django.db.models.fields.CharField')(max_length=256)),
            ('content_hebrew', self.gf('django.db.models.fields.TextField')()),
            ('content_english', self.gf('django.db.models.fields.TextField')()),
        ))
        db.send_create_signal(u'main', ['DynamicPage'])

        # Deleting field 'NavbarLink.url'
        db.delete_column(u'main_navbarlink', 'url')

        # Adding field 'NavbarLink.link_type'
        db.add_column(u'main_navbarlink', 'link_type',
                      self.gf('django.db.models.fields.CharField')(default='category', max_length=256),
                      keep_default=False)

        # Adding field 'NavbarLink.category'
        db.add_column(u'main_navbarlink', 'category',
                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.Category'], null=True, blank=True),
                      keep_default=False)

        # Adding field 'NavbarLink.page'
        db.add_column(u'main_navbarlink', 'page',
                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.DynamicPage'], null=True, blank=True),
                      keep_default=False)
    def forwards(self, orm):
        # Adding model 'TrackedUser'
        db.create_table(
            'sentry_trackeduser', (
                (
                    'id', self.gf('sentry.db.models.fields.bounded.BoundedBigAutoField')(
                        primary_key=True
                    )
                ), (
                    'project',
                    self.gf('sentry.db.models.fields.FlexibleForeignKey')(to=orm['sentry.Project'])
                ), ('ident', self.gf('django.db.models.fields.CharField')(max_length=200)),
                ('email', self.gf('django.db.models.fields.EmailField')(max_length=75, null=True)),
                ('data', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), (
                    'last_seen', self.gf('django.db.models.fields.DateTimeField')(
                        db_index=True
                    )
                ), (
                    'first_seen', self.gf('django.db.models.fields.DateTimeField')(
                        db_index=True
                    )
                ),
            )
        )
        db.send_create_signal('sentry', ['TrackedUser'])

        # Adding unique constraint on 'TrackedUser', fields ['project', 'ident']
        db.create_unique('sentry_trackeduser', ['project_id', 'ident'])
    def forwards(self, orm):
        
        # Deleting field 'Project.private'
        db.delete_column('gitlog_project', 'private')

        # Deleting field 'Project.source'
        db.delete_column('gitlog_project', 'source')

        # Adding field 'Project.public'
        db.add_column('gitlog_project', 'public', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)

        # Adding field 'Project.url'
        db.add_column('gitlog_project', 'url', self.gf('django.db.models.fields.URLField')(max_length=30, null=True, blank=True), keep_default=False)

        # Adding field 'Project.description'
        db.add_column('gitlog_project', 'description', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)

        # Adding M2M table for field writable on 'Project'
        db.create_table('gitlog_project_writable', (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('project', models.ForeignKey(orm['gitlog.project'], null=False)),
            ('user', models.ForeignKey(orm['auth.user'], null=False))
        ))
        db.create_unique('gitlog_project_writable', ['project_id', 'user_id'])

        # Adding M2M table for field readonly on 'Project'
        db.create_table('gitlog_project_readonly', (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('project', models.ForeignKey(orm['gitlog.project'], null=False)),
            ('user', models.ForeignKey(orm['auth.user'], null=False))
        ))
        db.create_unique('gitlog_project_readonly', ['project_id', 'user_id'])

        # Changing field 'Project.owner'
        db.alter_column('gitlog_project', 'owner_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['auth.User']))
コード例 #16
0
 def forwards(self, orm):
     # Adding model 'Update'
     db.create_table('aggregator_update', (
         ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
         ('timestamp', self.gf('django.db.models.fields.DateTimeField')()),
     ))
     db.send_create_signal('aggregator', ['Update'])
    def forwards(self, orm):
        # Adding model 'JellyfishIncident'
        db.create_table(u'data_jellyfishincident', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('date_observed', self.gf('django.db.models.fields.DateField')()),
            ('observation_station', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['data.ObservationStation'], on_delete=models.PROTECT)),
            ('source', self.gf('django.db.models.fields.CharField')(default='W', max_length=2)),
            ('sting_incidents', self.gf('django.db.models.fields.IntegerField')(default=0, blank=True)),
            ('total_incidents', self.gf('django.db.models.fields.IntegerField')(default=0, blank=True)),
            ('created_on', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
            ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='created-incident', null=True, to=orm['auth.User'])),
            ('updated_on', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
            ('updated_by', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='updated-incident', null=True, to=orm['auth.User'])),
        ))
        db.send_create_signal(u'data', ['JellyfishIncident'])

        # Adding model 'FlagChange'
        db.create_table(u'data_flagchange', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('date', self.gf('django.db.models.fields.DateTimeField')()),
            ('observation_station', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['data.ObservationStation'], on_delete=models.PROTECT)),
            ('flag_status', self.gf('django.db.models.fields.CharField')(default='N', max_length=1)),
            ('jellyfish_flag', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('created_on', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
            ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='created-flag', null=True, to=orm['auth.User'])),
            ('updated_on', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
            ('updated_by', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='updated-flag', null=True, to=orm['auth.User'])),
        ))
        db.send_create_signal(u'data', ['FlagChange'])

        # Adding field 'ObservationRoute.use_incident_form'
        db.add_column(u'data_observationroute', 'use_incident_form',
                      self.gf('django.db.models.fields.BooleanField')(default=False),
                      keep_default=False)
コード例 #18
0
 def forwards(self, orm):
     # Adding model 'CellSample'
     db.create_table(u'rotmic_cellsample', (
         (u'sample_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['rotmic.Sample'], unique=True, primary_key=True)),
         ('cell', self.gf('django.db.models.fields.related.ForeignKey')(related_name='cell_samples', to=orm['rotmic.CellComponent'])),
     ))
     db.send_create_signal('rotmic', ['CellSample'])
コード例 #19
0
ファイル: 0005_initial.py プロジェクト: samprzez/chicago_api
    def forwards(self, orm):
        # Adding model 'Service'
        db.create_table(
            u"social_data_service",
            (
                (u"id", self.gf("django.db.models.fields.AutoField")(primary_key=True)),
                ("name", self.gf("django.db.models.fields.CharField")(max_length=64)),
                ("icon", self.gf("django.db.models.fields.CharField")(max_length=128)),
            ),
        )
        db.send_create_signal(u"social_data", ["Service"])

        # Adding model 'Post'
        db.create_table(
            u"social_data_post",
            (
                (u"id", self.gf("django.db.models.fields.AutoField")(primary_key=True)),
                ("service", self.gf("django.db.models.fields.related.ForeignKey")(to=orm["social_data.Service"])),
                ("latitude", self.gf("django.db.models.fields.FloatField")()),
                ("longitude", self.gf("django.db.models.fields.FloatField")()),
                ("text", self.gf("django.db.models.fields.CharField")(max_length=256)),
                ("link", self.gf("django.db.models.fields.CharField")(max_length=256)),
                ("image", self.gf("django.db.models.fields.CharField")(max_length=256)),
                ("timestamp", self.gf("django.db.models.fields.DateTimeField")()),
            ),
        )
        db.send_create_signal(u"social_data", ["Post"])
コード例 #20
0
    def forwards(self, orm):
        # Adding model 'Subscriber'
        db.create_table(u'magazine_subscriber', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('email', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('streetAddress1', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('streetAddress2', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('city', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('state', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('country', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('zipCode', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('customerID', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('renew', self.gf('django.db.models.fields.BooleanField')()),
            ('subscriptionType', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('time', self.gf('django.db.models.fields.CharField')(max_length=255)),
        ))
        db.send_create_signal(u'magazine', ['Subscriber'])

        # Adding model 'Donation'
        db.create_table(u'magazine_donation', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('amount', self.gf('django.db.models.fields.IntegerField')()),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('email', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('streetAddress1', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('streetAddress2', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('city', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('state', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('country', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('zipCode', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('customerID', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('time', self.gf('django.db.models.fields.CharField')(max_length=255)),
        ))
        db.send_create_signal(u'magazine', ['Donation'])
コード例 #21
0
ファイル: 0001_initial.py プロジェクト: 350dotorg/aktivator
 def forwards(self, orm):
     # Adding model 'CalloutUserfield'
     db.create_table(u'actionkit_userdetail_calloutuserfield', (
         (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
         ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
     ))
     db.send_create_signal(u'actionkit_userdetail', ['CalloutUserfield'])
コード例 #22
0
ファイル: 0001_initial.py プロジェクト: indigo79/openconsent
    def forwards(self, orm):

        # Adding model 'Decision'
        db.create_table(
            "publicweb_decision",
            (
                ("id", self.gf("django.db.models.fields.AutoField")(primary_key=True)),
                ("short_name", self.gf("django.db.models.fields.CharField")(max_length=255)),
                ("decided_date", self.gf("django.db.models.fields.DateField")(null=True, blank=True)),
                ("effective_date", self.gf("django.db.models.fields.DateField")(null=True, blank=True)),
                ("review_date", self.gf("django.db.models.fields.DateField")(null=True, blank=True)),
                ("expiry_date", self.gf("django.db.models.fields.DateField")(null=True, blank=True)),
                ("budget", self.gf("django.db.models.fields.CharField")(max_length=255, blank=True)),
                ("people", self.gf("django.db.models.fields.CharField")(max_length=255, blank=True)),
                ("description", self.gf("tinymce.models.HTMLField")(blank=True)),
            ),
        )
        db.send_create_signal("publicweb", ["Decision"])

        # Adding model 'Concern'
        db.create_table(
            "publicweb_concern",
            (
                ("id", self.gf("django.db.models.fields.AutoField")(primary_key=True)),
                ("short_name", self.gf("django.db.models.fields.CharField")(max_length=255)),
                ("decision", self.gf("django.db.models.fields.related.ForeignKey")(to=orm["publicweb.Decision"])),
                ("description", self.gf("tinymce.models.HTMLField")(blank=True)),
                ("resolved", self.gf("django.db.models.fields.BooleanField")(default=False)),
            ),
        )
        db.send_create_signal("publicweb", ["Concern"])
コード例 #23
0
ファイル: 0001_initial.py プロジェクト: jadavbheda/gcd-django
    def forwards(self, orm):
        # Adding model 'Currency'
        db.create_table(
            "stddata_currency",
            (
                ("id", self.gf("django.db.models.fields.AutoField")(primary_key=True)),
                ("code", self.gf("django.db.models.fields.CharField")(unique=True, max_length=3)),
                ("name", self.gf("django.db.models.fields.CharField")(max_length=100, db_index=True)),
                ("is_decimal", self.gf("django.db.models.fields.BooleanField")(default=True)),
            ),
        )
        db.send_create_signal("stddata", ["Currency"])

        # Adding model 'Date'
        db.create_table(
            "stddata_date",
            (
                ("id", self.gf("django.db.models.fields.AutoField")(primary_key=True)),
                ("year", self.gf("django.db.models.fields.CharField")(db_index=True, max_length=4, blank=True)),
                ("month", self.gf("django.db.models.fields.CharField")(db_index=True, max_length=2, blank=True)),
                ("day", self.gf("django.db.models.fields.CharField")(db_index=True, max_length=2, blank=True)),
                ("year_uncertain", self.gf("django.db.models.fields.BooleanField")(default=False)),
                ("month_uncertain", self.gf("django.db.models.fields.BooleanField")(default=False)),
                ("day_uncertain", self.gf("django.db.models.fields.BooleanField")(default=False)),
            ),
        )
        db.send_create_signal("stddata", ["Date"])
    def backwards(self, orm):
        # Adding M2M table for field comment on 'Event'
        m2m_table_name = db.shorten_name(u'event_event_comment')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('event', models.ForeignKey(orm[u'event.event'], null=False)),
            ('comment', models.ForeignKey(orm[u'comment.comment'], null=False))
        ))
        db.create_unique(m2m_table_name, ['event_id', 'comment_id'])


        # Changing field 'Event.category'
        db.alter_column(u'event_event', 'category_id', self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['event.EventCategory']))

        # Changing field 'Event.fr'
        db.alter_column(u'event_event', 'fr', self.gf('django.db.models.fields.DateTimeField')(default=1))

        # Changing field 'Event.cover'
        db.alter_column(u'event_event', 'cover', self.gf('django.db.models.fields.files.ImageField')(default=1, max_length=100))

        # Changing field 'Event.to'
        db.alter_column(u'event_event', 'to', self.gf('django.db.models.fields.DateTimeField')(default=1))

        # Changing field 'Event.place'
        db.alter_column(u'event_event', 'place', self.gf('django.db.models.fields.CharField')(default=1, max_length=250))
    def forwards(self, orm):
        # Adding model 'Field'
        db.create_table(u'oil_and_gas_field', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(default='', unique=True, max_length=50)),
            ('country', self.gf('django.db.models.fields.CharField')(default='', unique=True, max_length=50)),
            ('production_oil', self.gf('django.db.models.fields.TextField')(default='')),
            ('production_gas', self.gf('django.db.models.fields.TextField')(default='')),
            ('production', self.gf('django.db.models.fields.TextField')(default='')),
            ('production_oil_smooth', self.gf('django.db.models.fields.TextField')(default='')),
            ('production_gas_smooth', self.gf('django.db.models.fields.TextField')(default='')),
            ('production_smooth', self.gf('django.db.models.fields.TextField')(default='')),
        ))
        db.send_create_signal(u'oil_and_gas', ['Field'])

        # Deleting field 'CountryProduction.depth'
        db.delete_column(u'oil_and_gas_countryproduction', 'depth')

        # Adding unique constraint on 'CountryProduction', fields ['date', 'name']
        db.create_unique(u'oil_and_gas_countryproduction', ['date', 'name'])

        # Adding unique constraint on 'FieldProduction', fields ['date', 'name']
        db.create_unique(u'oil_and_gas_fieldproduction', ['date', 'name'])

        # Adding unique constraint on 'WellProduction', fields ['date', 'name']
        db.create_unique(u'oil_and_gas_wellproduction', ['date', 'name'])
コード例 #26
0
ファイル: 0001_initial.py プロジェクト: saturnisbig/_17relax
    def forwards(self, orm):
        # Adding model 'Tag'
        db.create_table(u'relax_tag', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=25)),
            ('tagid', self.gf('django.db.models.fields.IntegerField')(default=0, blank=True)),
            ('come_from', self.gf('django.db.models.fields.CharField')(max_length=25, blank=True)),
            ('ctime', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
        ))
        db.send_create_signal(u'relax', ['Tag'])

        # Adding model 'News'
        db.create_table(u'relax_news', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('docid', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)),
            ('title', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('big_pic', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)),
            ('list_pic', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)),
            ('abstract', self.gf('django.db.models.fields.CharField')(max_length=200, blank=True)),
            ('update_time', self.gf('django.db.models.fields.DateTimeField')()),
            ('content', self.gf('django.db.models.fields.TextField')()),
            ('comment_num', self.gf('django.db.models.fields.IntegerField')(default=0)),
            ('ctime', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
            ('tag', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['relax.Tag'])),
        ))
        db.send_create_signal(u'relax', ['News'])
コード例 #27
0
    def forwards(self, orm):
        # Adding model 'EntrezTerm'
        db.create_table(u'entrez_entrezterm', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50)),
            ('term', self.gf('django.db.models.fields.CharField')(max_length=512)),
            ('owner', self.gf('django.db.models.fields.related.ForeignKey')(related_name='term_owner', to=orm['auth.User'])),
            ('period', self.gf('django.db.models.fields.PositiveSmallIntegerField')(default=7)),
            ('db', self.gf('django.db.models.fields.CharField')(default='pubmed', max_length=30)),
            ('creation_date', self.gf('django.db.models.fields.DateField')(blank=True)),
            ('lastedit_date', self.gf('django.db.models.fields.DateField')(blank=True)),
        ))
        db.send_create_signal(u'entrez', ['EntrezTerm'])

        # Adding model 'EntrezEntry'
        db.create_table(u'entrez_entrezentry', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('eid', self.gf('django.db.models.fields.CharField')(max_length=20)),
            ('db', self.gf('django.db.models.fields.CharField')(max_length=30)),
            ('owner', self.gf('django.db.models.fields.related.ForeignKey')(related_name='entry_owner', to=orm['auth.User'])),
            ('term', self.gf('django.db.models.fields.related.ForeignKey')(related_name='entry_term', to=orm['entrez.EntrezTerm'])),
            ('content', self.gf('django.db.models.fields.TextField')()),
            ('content_html', self.gf('django.db.models.fields.TextField')()),
            ('title', self.gf('django.db.models.fields.CharField')(max_length=512)),
            ('magzine', self.gf('django.db.models.fields.CharField')(max_length=512, blank=True)),
            ('authors', self.gf('django.db.models.fields.CharField')(max_length=512, blank=True)),
            ('abstract', self.gf('django.db.models.fields.TextField')(blank=True)),
            ('read', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('creation_time', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
            ('lastedit_time', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
        ))
        db.send_create_signal(u'entrez', ['EntrezEntry'])
コード例 #28
0
 def forwards(self, orm):
     # Adding model 'UploadedFile'
     db.create_table('musikovweb_uploadedfile', (
         ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
         ('uploadfile', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
     ))
     db.send_create_signal('musikovweb', ['UploadedFile'])
    def forwards(self, orm):
        # Deleting field 'SponsorshipLevel.content_type'
        db.delete_column(u'camp_sponsorshiplevel', 'content_type_id')

        # Deleting field 'SponsorshipLevel.object_id'
        db.delete_column(u'camp_sponsorshiplevel', 'object_id')

        # Adding M2M table for field events on 'SponsorshipLevel'
        db.create_table(u'camp_sponsorshiplevel_events', (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('sponsorshiplevel', models.ForeignKey(orm[u'camp.sponsorshiplevel'], null=False)),
            ('event', models.ForeignKey(orm[u'sked.event'], null=False))
        ))
        db.create_unique(u'camp_sponsorshiplevel_events', ['sponsorshiplevel_id', 'event_id'])

        # Deleting field 'Sponsor.content_type'
        db.delete_column(u'camp_sponsor', 'content_type_id')

        # Deleting field 'Sponsor.object_id'
        db.delete_column(u'camp_sponsor', 'object_id')

        # Adding field 'Sponsor.event'
        db.add_column(u'camp_sponsor', 'event',
                      self.gf('django.db.models.fields.related.ForeignKey')(default=1, related_name='sponsors', to=orm['sked.Event']),
                      keep_default=False)
コード例 #30
0
 def backwards(self, orm):
     # Adding model 'Pic'
     db.create_table(u'exchange_pic', (
         ('image', self.gf('django.db.models.fields.files.ImageField')(max_length=100)),
         (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
     ))
     db.send_create_signal(u'exchange', ['Pic'])
コード例 #31
0
ファイル: 0001_initial.py プロジェクト: agateau/pydici
    def forwards(self, orm):
        # Adding model 'Subsidiary'
        db.create_table(u'crm_subsidiary', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=200)),
            ('code', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=3)),
            ('web', self.gf('django.db.models.fields.URLField')(
                max_length=200, null=True, blank=True)),
        ))
        db.send_create_signal(u'crm', ['Subsidiary'])

        # Adding model 'Company'
        db.create_table(u'crm_company', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=200)),
            ('code', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=3)),
            ('web', self.gf('django.db.models.fields.URLField')(
                max_length=200, null=True, blank=True)),
            ('businessOwner',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='company_business_owner',
                 null=True,
                 to=orm['people.Consultant'])),
        ))
        db.send_create_signal(u'crm', ['Company'])

        # Adding model 'ClientOrganisation'
        db.create_table(u'crm_clientorganisation', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('company', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['crm.Company'])),
        ))
        db.send_create_signal(u'crm', ['ClientOrganisation'])

        # Adding unique constraint on 'ClientOrganisation', fields ['name', 'company']
        db.create_unique(u'crm_clientorganisation', ['name', 'company_id'])

        # Adding model 'Contact'
        db.create_table(u'crm_contact', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=200)),
            ('email', self.gf('django.db.models.fields.EmailField')(
                max_length=75, blank=True)),
            ('phone', self.gf('django.db.models.fields.CharField')(
                max_length=30, blank=True)),
            ('mobile_phone', self.gf('django.db.models.fields.CharField')(
                max_length=30, blank=True)),
            ('fax', self.gf('django.db.models.fields.CharField')(max_length=30,
                                                                 blank=True)),
            ('function', self.gf('django.db.models.fields.CharField')(
                max_length=200, blank=True)),
        ))
        db.send_create_signal(u'crm', ['Contact'])

        # Adding M2M table for field contact_points on 'Contact'
        m2m_table_name = db.shorten_name(u'crm_contact_contact_points')
        db.create_table(
            m2m_table_name,
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('contact', models.ForeignKey(orm[u'crm.contact'], null=False)),
             ('consultant',
              models.ForeignKey(orm[u'people.consultant'], null=False))))
        db.create_unique(m2m_table_name, ['contact_id', 'consultant_id'])

        # Adding model 'BusinessBroker'
        db.create_table(u'crm_businessbroker', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('company', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['crm.Company'])),
            ('contact', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['crm.Contact'],
                null=True,
                on_delete=models.SET_NULL,
                blank=True)),
        ))
        db.send_create_signal(u'crm', ['BusinessBroker'])

        # Adding unique constraint on 'BusinessBroker', fields ['company', 'contact']
        db.create_unique(u'crm_businessbroker', ['company_id', 'contact_id'])

        # Adding model 'Supplier'
        db.create_table(u'crm_supplier', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('company', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['crm.Company'])),
            ('contact', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['crm.Contact'],
                null=True,
                on_delete=models.SET_NULL,
                blank=True)),
        ))
        db.send_create_signal(u'crm', ['Supplier'])

        # Adding unique constraint on 'Supplier', fields ['company', 'contact']
        db.create_unique(u'crm_supplier', ['company_id', 'contact_id'])

        # Adding model 'Client'
        db.create_table(u'crm_client', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('organisation',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['crm.ClientOrganisation'])),
            ('contact', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['crm.Contact'],
                null=True,
                on_delete=models.SET_NULL,
                blank=True)),
            ('expectations', self.gf('django.db.models.fields.CharField')(
                default='3_FLAT', max_length=30)),
            ('alignment', self.gf('django.db.models.fields.CharField')(
                default='2_STANDARD', max_length=30)),
            ('active',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
        ))
        db.send_create_signal(u'crm', ['Client'])

        # Adding unique constraint on 'Client', fields ['organisation', 'contact']
        db.create_unique(u'crm_client', ['organisation_id', 'contact_id'])

        # Adding model 'MissionContact'
        db.create_table(u'crm_missioncontact', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('company', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['crm.Company'])),
            ('contact', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['crm.Contact'])),
        ))
        db.send_create_signal(u'crm', ['MissionContact'])

        # Adding unique constraint on 'MissionContact', fields ['company', 'contact']
        db.create_unique(u'crm_missioncontact', ['company_id', 'contact_id'])

        # Adding model 'AdministrativeFunction'
        db.create_table(u'crm_administrativefunction', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=200)),
        ))
        db.send_create_signal(u'crm', ['AdministrativeFunction'])

        # Adding model 'AdministrativeContact'
        db.create_table(u'crm_administrativecontact', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('company', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['crm.Company'])),
            ('function', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['crm.AdministrativeFunction'])),
            ('default_phone', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True, blank=True)),
            ('default_mail', self.gf('django.db.models.fields.EmailField')(
                max_length=100, null=True, blank=True)),
            ('default_fax', self.gf('django.db.models.fields.CharField')(
                max_length=100, null=True, blank=True)),
            ('contact', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['crm.Contact'], null=True, blank=True)),
        ))
        db.send_create_signal(u'crm', ['AdministrativeContact'])

        # Adding unique constraint on 'AdministrativeContact', fields ['company', 'contact']
        db.create_unique(u'crm_administrativecontact',
                         ['company_id', 'contact_id'])
コード例 #32
0
ファイル: 0001_initial.py プロジェクト: sarkartanzil/ufs
    def forwards(self, orm):

        # Adding model 'Group'
        db.create_table('accounting_group', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('slug', self.gf('django.db.models.fields.SlugField')(
                unique=True, max_length=50, db_index=True)),
            ('warn_limit', self.gf('django.db.models.fields.IntegerField')(
                null=True, blank=True)),
            ('block_limit', self.gf('django.db.models.fields.IntegerField')(
                null=True, blank=True)),
            ('logo', self.gf('django.db.models.fields.files.ImageField')(
                max_length=100, blank=True)),
            ('email', self.gf('django.db.models.fields.EmailField')(
                max_length=75, blank=True)),
        ))
        db.send_create_signal('accounting', ['Group'])

        # Adding M2M table for field admins on 'Group'
        db.create_table(
            'accounting_group_admins',
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('group', models.ForeignKey(orm['accounting.group'], null=False)),
             ('user', models.ForeignKey(orm['auth.user'], null=False))))
        db.create_unique('accounting_group_admins', ['group_id', 'user_id'])

        # Adding model 'Account'
        db.create_table('accounting_account', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('short_name', self.gf('django.db.models.fields.CharField')(
                max_length=100, blank=True)),
            ('slug', self.gf('django.db.models.fields.SlugField')(
                max_length=50, db_index=True)),
            ('group', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['accounting.Group'])),
            ('type', self.gf('django.db.models.fields.CharField')(
                default='Li', max_length=2)),
            ('owner', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['auth.User'], null=True, blank=True)),
            ('active',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('ignore_block_limit',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('blocked',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('group_account',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('accounting', ['Account'])

        # Adding unique constraint on 'Account', fields ['slug', 'group']
        db.create_unique('accounting_account', ['slug', 'group_id'])

        # Adding unique constraint on 'Account', fields ['owner', 'group']
        db.create_unique('accounting_account', ['owner_id', 'group_id'])

        # Adding model 'RoleAccount'
        db.create_table('accounting_roleaccount', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('group', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['accounting.Group'])),
            ('role',
             self.gf('django.db.models.fields.CharField')(max_length=4)),
            ('account', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['accounting.Account'])),
        ))
        db.send_create_signal('accounting', ['RoleAccount'])

        # Adding model 'Settlement'
        db.create_table('accounting_settlement', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('group', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['accounting.Group'])),
            ('date', self.gf('django.db.models.fields.DateField')()),
            ('comment', self.gf('django.db.models.fields.CharField')(
                max_length=200, blank=True)),
            ('closed',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('accounting', ['Settlement'])

        # Adding model 'Transaction'
        db.create_table('accounting_transaction', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('group', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='real_transaction_set',
                to=orm['accounting.Group'])),
            ('settlement',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['accounting.Settlement'], null=True, blank=True)),
            ('date', self.gf('django.db.models.fields.DateField')()),
            ('last_modified', self.gf('django.db.models.fields.DateTimeField')(
                auto_now_add=True, blank=True)),
            ('state', self.gf('django.db.models.fields.CharField')(
                max_length=3, blank=True)),
        ))
        db.send_create_signal('accounting', ['Transaction'])

        # Adding model 'TransactionLog'
        db.create_table('accounting_transactionlog', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('transaction',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='log_set', to=orm['accounting.Transaction'])),
            ('type',
             self.gf('django.db.models.fields.CharField')(max_length=3)),
            ('timestamp', self.gf('django.db.models.fields.DateTimeField')(
                auto_now_add=True, blank=True)),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['auth.User'])),
            ('message', self.gf('django.db.models.fields.CharField')(
                max_length=200, blank=True)),
        ))
        db.send_create_signal('accounting', ['TransactionLog'])

        # Adding model 'TransactionEntry'
        db.create_table('accounting_transactionentry', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('transaction',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='entry_set', to=orm['accounting.Transaction'])),
            ('account', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['accounting.Account'])),
            ('debit', self.gf('django.db.models.fields.DecimalField')(
                default=0, max_digits=10, decimal_places=2)),
            ('credit', self.gf('django.db.models.fields.DecimalField')(
                default=0, max_digits=10, decimal_places=2)),
        ))
        db.send_create_signal('accounting', ['TransactionEntry'])

        # Adding unique constraint on 'TransactionEntry', fields ['transaction', 'account']
        db.create_unique('accounting_transactionentry',
                         ['transaction_id', 'account_id'])
コード例 #33
0
    def forwards(self, orm):
        # Adding model 'BlogPost'
        db.create_table(u'inboxen_blogpost', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('subject',
             self.gf('django.db.models.fields.CharField')(max_length=512)),
            ('body', self.gf('django.db.models.fields.TextField')()),
            ('date', self.gf('django.db.models.fields.DateTimeField')()),
            ('modified', self.gf('django.db.models.fields.DateTimeField')()),
            ('author', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['auth.User'])),
            ('draft',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
        ))
        db.send_create_signal(u'inboxen', ['BlogPost'])

        # Adding model 'Domain'
        db.create_table(u'inboxen_domain', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('domain',
             self.gf('django.db.models.fields.CharField')(max_length=253)),
        ))
        db.send_create_signal(u'inboxen', ['Domain'])

        # Adding model 'Inbox'
        db.create_table(u'inboxen_inbox', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('inbox',
             self.gf('django.db.models.fields.CharField')(max_length=64)),
            ('domain', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['inboxen.Domain'])),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['auth.User'])),
            ('created', self.gf('django.db.models.fields.DateTimeField')()),
            ('deleted',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal(u'inboxen', ['Inbox'])

        # Adding model 'Request'
        db.create_table(u'inboxen_request', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('amount', self.gf('django.db.models.fields.IntegerField')()),
            ('succeeded', self.gf('django.db.models.fields.NullBooleanField')(
                default=None, null=True, blank=True)),
            ('date', self.gf('django.db.models.fields.DateTimeField')()),
            ('authorizer',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['auth.User'], null=True, blank=True)),
            ('requester',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='requester', to=orm['auth.User'])),
            ('result', self.gf('django.db.models.fields.CharField')(
                max_length=1024, null=True, blank=True)),
        ))
        db.send_create_signal(u'inboxen', ['Request'])

        # Adding model 'Attachment'
        db.create_table(u'inboxen_attachment', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('content_type', self.gf('django.db.models.fields.CharField')(
                max_length=256, null=True, blank=True)),
            ('content_disposition',
             self.gf('django.db.models.fields.CharField')(
                 max_length=512, null=True, blank=True)),
            ('path', self.gf('django.db.models.fields.FilePathField')(
                default=None, max_length=100, null=True, blank=True)),
            ('_data', self.gf('django.db.models.fields.TextField')(
                null=True, db_column='data', blank=True)),
        ))
        db.send_create_signal(u'inboxen', ['Attachment'])

        # Adding model 'Tag'
        db.create_table(u'inboxen_tag', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('inbox', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['inboxen.Inbox'])),
            ('tag',
             self.gf('django.db.models.fields.CharField')(max_length=256)),
        ))
        db.send_create_signal(u'inboxen', ['Tag'])

        # Adding model 'Header'
        db.create_table(u'inboxen_header', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=1024)),
            ('data',
             self.gf('django.db.models.fields.CharField')(max_length=1024)),
        ))
        db.send_create_signal(u'inboxen', ['Header'])

        # Adding model 'Email'
        db.create_table(u'inboxen_email', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('read',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='user', to=orm['auth.User'])),
            ('inbox', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['inboxen.Inbox'])),
            ('body', self.gf('django.db.models.fields.TextField')(null=True)),
            ('recieved_date',
             self.gf('django.db.models.fields.DateTimeField')()),
            ('deleted',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal(u'inboxen', ['Email'])

        # Adding M2M table for field headers on 'Email'
        m2m_table_name = db.shorten_name(u'inboxen_email_headers')
        db.create_table(
            m2m_table_name,
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('email', models.ForeignKey(orm[u'inboxen.email'], null=False)),
             ('header', models.ForeignKey(orm[u'inboxen.header'],
                                          null=False))))
        db.create_unique(m2m_table_name, ['email_id', 'header_id'])

        # Adding M2M table for field attachments on 'Email'
        m2m_table_name = db.shorten_name(u'inboxen_email_attachments')
        db.create_table(
            m2m_table_name,
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('email', models.ForeignKey(orm[u'inboxen.email'], null=False)),
             ('attachment',
              models.ForeignKey(orm[u'inboxen.attachment'], null=False))))
        db.create_unique(m2m_table_name, ['email_id', 'attachment_id'])

        # Adding model 'UserProfile'
        db.create_table(u'inboxen_userprofile', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user', self.gf('django.db.models.fields.related.OneToOneField')(
                to=orm['auth.User'], unique=True)),
            ('html_preference',
             self.gf('django.db.models.fields.IntegerField')(default=2)),
            ('pool_amount',
             self.gf('django.db.models.fields.IntegerField')(default=500)),
        ))
        db.send_create_signal(u'inboxen', ['UserProfile'])

        # Adding model 'TOTPAuth'
        db.create_table(u'inboxen_totpauth', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user', self.gf('django.db.models.fields.related.OneToOneField')(
                to=orm['auth.User'], unique=True)),
            ('secret',
             self.gf('django.db.models.fields.CharField')(max_length=128)),
        ))
        db.send_create_signal(u'inboxen', ['TOTPAuth'])

        # Adding model 'Statistic'
        db.create_table(u'inboxen_statistic', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user_count', self.gf('django.db.models.fields.IntegerField')()),
            ('active_count',
             self.gf('django.db.models.fields.IntegerField')()),
            ('new_count', self.gf('django.db.models.fields.IntegerField')()),
            ('date', self.gf('django.db.models.fields.DateTimeField')()),
        ))
        db.send_create_signal(u'inboxen', ['Statistic'])
コード例 #34
0
    def forwards(self, orm):
        # Adding model 'Permission'
        db.create_table(u'auth_permission', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=50)),
            ('content_type',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['contenttypes.ContentType'])),
            ('codename',
             self.gf('django.db.models.fields.CharField')(max_length=100)),
        ))
        db.send_create_signal(u'auth', ['Permission'])

        # Adding unique constraint on 'Permission', fields ['content_type', 'codename']
        db.create_unique(u'auth_permission', ['content_type_id', 'codename'])

        # Adding model 'Group'
        db.create_table(u'auth_group', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=80)),
        ))
        db.send_create_signal(u'auth', ['Group'])

        # Adding M2M table for field permissions on 'Group'
        m2m_table_name = db.shorten_name(u'auth_group_permissions')
        db.create_table(
            m2m_table_name,
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('group', models.ForeignKey(orm[u'auth.group'], null=False)),
             ('permission',
              models.ForeignKey(orm[u'auth.permission'], null=False))))
        db.create_unique(m2m_table_name, ['group_id', 'permission_id'])

        # Adding model 'User'
        db.create_table(u'auth_user', (
            (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)),
            ('is_superuser',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('username', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=30)),
            ('first_name', self.gf('django.db.models.fields.CharField')(
                max_length=30, blank=True)),
            ('last_name', self.gf('django.db.models.fields.CharField')(
                max_length=30, blank=True)),
            ('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)),
        ))
        db.send_create_signal(u'auth', ['User'])

        # Adding M2M table for field groups on 'User'
        m2m_table_name = db.shorten_name(u'auth_user_groups')
        db.create_table(
            m2m_table_name,
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('user', models.ForeignKey(orm[u'auth.user'], null=False)),
             ('group', models.ForeignKey(orm[u'auth.group'], null=False))))
        db.create_unique(m2m_table_name, ['user_id', 'group_id'])

        # Adding M2M table for field user_permissions on 'User'
        m2m_table_name = db.shorten_name(u'auth_user_user_permissions')
        db.create_table(
            m2m_table_name,
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('user', models.ForeignKey(orm[u'auth.user'], null=False)),
             ('permission',
              models.ForeignKey(orm[u'auth.permission'], null=False))))
        db.create_unique(m2m_table_name, ['user_id', 'permission_id'])
コード例 #35
0
    def forwards(self, orm):

        # Adding model 'Country'
        db.create_table('l10n_country', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('iso2_code', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=2)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=128)),
            ('printable_name',
             self.gf('django.db.models.fields.CharField')(max_length=128)),
            ('iso3_code', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=3)),
            ('numcode',
             self.gf('django.db.models.fields.PositiveSmallIntegerField')(
                 null=True, blank=True)),
            ('active',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('continent',
             self.gf('django.db.models.fields.CharField')(max_length=2)),
            ('admin_area', self.gf('django.db.models.fields.CharField')(
                max_length=2, null=True, blank=True)),
        ))
        db.send_create_signal('l10n', ['Country'])

        # Adding model 'AdminArea'
        db.create_table('l10n_adminarea', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('country', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['l10n.Country'])),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=60)),
            ('abbrev', self.gf('django.db.models.fields.CharField')(
                max_length=3, null=True, blank=True)),
            ('active',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
        ))
        db.send_create_signal('l10n', ['AdminArea'])

        # Adding model 'Address'
        db.create_table('l10n_address', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user_shipping',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 blank=True,
                 related_name='shipping_address',
                 unique=True,
                 null=True,
                 to=orm['auth.User'])),
            ('user_billing',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 blank=True,
                 related_name='billing_address',
                 unique=True,
                 null=True,
                 to=orm['auth.User'])),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('address',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('address2', self.gf('django.db.models.fields.CharField')(
                max_length=255, blank=True)),
            ('zip_code',
             self.gf('django.db.models.fields.CharField')(max_length=20)),
            ('city',
             self.gf('django.db.models.fields.CharField')(max_length=20)),
            ('state', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['l10n.AdminArea'])),
            ('country', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['l10n.Country'])),
        ))
        db.send_create_signal('l10n', ['Address'])
コード例 #36
0
    def forwards(self, orm):
        # Adding model 'TipoFinanciamiento'
        db.create_table(u'encuesta_tipofinanciamiento', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('nombre',
             self.gf('django.db.models.fields.CharField')(max_length=250)),
        ))
        db.send_create_signal(u'encuesta', ['TipoFinanciamiento'])

        # Adding model 'Oficinas'
        db.create_table(u'encuesta_oficinas', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('nombre',
             self.gf('django.db.models.fields.CharField')(max_length=100)),
        ))
        db.send_create_signal(u'encuesta', ['Oficinas'])

        # Adding unique constraint on 'Oficinas', fields ['nombre']
        db.create_unique(u'encuesta_oficinas', ['nombre'])

        # Adding model 'AlimentosSeguridad'
        db.create_table(u'encuesta_alimentosseguridad', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('nombre',
             self.gf('django.db.models.fields.CharField')(max_length=250)),
            ('clasificacion',
             self.gf('django.db.models.fields.IntegerField')()),
        ))
        db.send_create_signal(u'encuesta', ['AlimentosSeguridad'])

        # Adding field 'Credito.tipo_fina'
        db.add_column(u'encuesta_credito',
                      'tipo_fina',
                      self.gf('django.db.models.fields.related.ForeignKey')(
                          default=1, to=orm['encuesta.TipoFinanciamiento']),
                      keep_default=False)

        # Adding field 'UsoTierra.pastos_corte'
        db.add_column(u'encuesta_usotierra',
                      'pastos_corte',
                      self.gf('django.db.models.fields.DecimalField')(
                          default=u'0.00',
                          null=True,
                          max_digits=10,
                          decimal_places=2,
                          blank=True),
                      keep_default=False)

        # Adding field 'UsoTierra.pasto_obsercacion'
        db.add_column(u'encuesta_usotierra',
                      'pasto_obsercacion',
                      self.gf('django.db.models.fields.CharField')(
                          max_length=250, null=True, blank=True),
                      keep_default=False)

        # Deleting field 'SeguridadPAnimal.plan_negocio'
        db.delete_column(u'encuesta_seguridadpanimal', 'plan_negocio')

        # Deleting field 'Educacion.circ_estudio_adulto'
        db.delete_column(u'encuesta_educacion', 'circ_estudio_adulto')

        # Adding field 'Educacion.estu_eba'
        db.add_column(u'encuesta_educacion',
                      'estu_eba',
                      self.gf('django.db.models.fields.IntegerField')(
                          null=True, blank=True),
                      keep_default=False)

        # Adding field 'Educacion.estu_mined'
        db.add_column(u'encuesta_educacion',
                      'estu_mined',
                      self.gf('django.db.models.fields.IntegerField')(
                          null=True, blank=True),
                      keep_default=False)

        # Adding field 'Educacion.estu_uni'
        db.add_column(u'encuesta_educacion',
                      'estu_uni',
                      self.gf('django.db.models.fields.IntegerField')(
                          null=True, blank=True),
                      keep_default=False)

        # Adding field 'Educacion.egresado_eba'
        db.add_column(u'encuesta_educacion',
                      'egresado_eba',
                      self.gf('django.db.models.fields.IntegerField')(
                          null=True, blank=True),
                      keep_default=False)

        # Adding field 'Educacion.egresado_mined'
        db.add_column(u'encuesta_educacion',
                      'egresado_mined',
                      self.gf('django.db.models.fields.IntegerField')(
                          null=True, blank=True),
                      keep_default=False)

        # Adding field 'SeguridadCAnuales.consumo_animal'
        db.add_column(u'encuesta_seguridadcanuales',
                      'consumo_animal',
                      self.gf('django.db.models.fields.FloatField')(
                          null=True, blank=True),
                      keep_default=False)

        # Changing field 'SeguridadCAnuales.perdidas'
        db.alter_column(
            u'encuesta_seguridadcanuales', 'perdidas',
            self.gf('django.db.models.fields.FloatField')(null=True))

        # Changing field 'SeguridadCAnuales.precio_promedio_orga'
        db.alter_column(
            u'encuesta_seguridadcanuales', 'precio_promedio_orga',
            self.gf('django.db.models.fields.FloatField')(null=True))

        # Changing field 'SeguridadCAnuales.venta_organizada'
        db.alter_column(
            u'encuesta_seguridadcanuales', 'venta_organizada',
            self.gf('django.db.models.fields.FloatField')(null=True))

        # Changing field 'SeguridadCAnuales.venta_no'
        db.alter_column(
            u'encuesta_seguridadcanuales', 'venta_no',
            self.gf('django.db.models.fields.FloatField')(null=True))

        # Changing field 'SeguridadCAnuales.precio_promedio_no'
        db.alter_column(
            u'encuesta_seguridadcanuales', 'precio_promedio_no',
            self.gf('django.db.models.fields.FloatField')(null=True))

        # Changing field 'SeguridadCAnuales.auto_consumo'
        db.alter_column(
            u'encuesta_seguridadcanuales', 'auto_consumo',
            self.gf('django.db.models.fields.FloatField')(null=True))
        # Deleting field 'Encuesta.oficina'
        db.delete_column(u'encuesta_encuesta', 'oficina')

        # Adding field 'Encuesta.oficina2'
        db.add_column(u'encuesta_encuesta',
                      'oficina2',
                      self.gf('django.db.models.fields.related.ForeignKey')(
                          to=orm['encuesta.Oficinas'], null=True, blank=True),
                      keep_default=False)

        # Deleting field 'SeguridadAlimentaria.nivel_consumo_suficiente'
        db.delete_column(u'encuesta_seguridadalimentaria',
                         'nivel_consumo_suficiente')

        # Deleting field 'SeguridadAlimentaria.porcentaje_nivel'
        db.delete_column(u'encuesta_seguridadalimentaria', 'porcentaje_nivel')

        # Deleting field 'SeguridadAlimentaria.porcentaje_compran'
        db.delete_column(u'encuesta_seguridadalimentaria',
                         'porcentaje_compran')

        # Adding field 'SeguridadAlimentaria.consumo'
        db.add_column(
            u'encuesta_seguridadalimentaria',
            'consumo',
            self.gf('django.db.models.fields.IntegerField')(default=1),
            keep_default=False)

        # Renaming column for 'SeguridadAlimentaria.alimentos' to match new field type.
        db.rename_column(u'encuesta_seguridadalimentaria', 'alimentos',
                         'alimentos_id')
        # Changing field 'SeguridadAlimentaria.alimentos'
        db.alter_column(
            u'encuesta_seguridadalimentaria', 'alimentos_id',
            self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['encuesta.AlimentosSeguridad']))
        # Adding index on 'SeguridadAlimentaria', fields ['alimentos']
        db.create_index(u'encuesta_seguridadalimentaria', ['alimentos_id'])

        # Deleting field 'SeguridadPProcesados.plan_negocio'
        db.delete_column(u'encuesta_seguridadpprocesados', 'plan_negocio')

        # Adding field 'Finca.zona'
        db.add_column(u'encuesta_finca',
                      'zona',
                      self.gf('django.db.models.fields.IntegerField')(
                          null=True, blank=True),
                      keep_default=False)

        # Adding field 'Finca.seneamiento'
        db.add_column(
            u'encuesta_finca',
            'seneamiento',
            self.gf('django.db.models.fields.IntegerField')(default=1),
            keep_default=False)

        # Changing field 'Finca.microcuenca'
        db.alter_column(
            u'encuesta_finca', 'microcuenca_id',
            self.gf('smart_selects.db_fields.ChainedForeignKey')(
                to=orm['lugar.Microcuenca'], null=True))
        # Adding field 'SeguridadSaf.consumo_animal'
        db.add_column(u'encuesta_seguridadsaf',
                      'consumo_animal',
                      self.gf('django.db.models.fields.FloatField')(
                          null=True, blank=True),
                      keep_default=False)

        # Changing field 'SeguridadSaf.precio_promedio_orga'
        db.alter_column(
            u'encuesta_seguridadsaf', 'precio_promedio_orga',
            self.gf('django.db.models.fields.FloatField')(null=True))

        # Changing field 'SeguridadSaf.venta_organizada'
        db.alter_column(
            u'encuesta_seguridadsaf', 'venta_organizada',
            self.gf('django.db.models.fields.FloatField')(null=True))

        # Changing field 'SeguridadSaf.venta_no'
        db.alter_column(
            u'encuesta_seguridadsaf', 'venta_no',
            self.gf('django.db.models.fields.FloatField')(null=True))

        # Changing field 'SeguridadSaf.precio_promedio_no'
        db.alter_column(
            u'encuesta_seguridadsaf', 'precio_promedio_no',
            self.gf('django.db.models.fields.FloatField')(null=True))

        # Changing field 'SeguridadSaf.auto_consumo'
        db.alter_column(
            u'encuesta_seguridadsaf', 'auto_consumo',
            self.gf('django.db.models.fields.FloatField')(null=True))

        # Changing field 'SeguridadSaf.perdidas'
        db.alter_column(
            u'encuesta_seguridadsaf', 'perdidas',
            self.gf('django.db.models.fields.FloatField')(null=True))

        # Changing field 'SeguridadSaf.produccion_total'
        db.alter_column(
            u'encuesta_seguridadsaf', 'produccion_total',
            self.gf('django.db.models.fields.FloatField')(null=True))
コード例 #37
0
    def forwards(self, orm):

        # Adding model 'Config'
        db.create_table('lbforum_config', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('key',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('value',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
        ))
        db.send_create_signal('lbforum', ['Config'])

        # Adding model 'Category'
        db.create_table('lbforum_category', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('description',
             self.gf('django.db.models.fields.TextField')(default='')),
            ('ordering',
             self.gf('django.db.models.fields.PositiveIntegerField')(
                 default=1)),
            ('created_on', self.gf('django.db.models.fields.DateTimeField')(
                auto_now_add=True, blank=True)),
            ('updated_on', self.gf('django.db.models.fields.DateTimeField')(
                null=True, blank=True)),
        ))
        db.send_create_signal('lbforum', ['Category'])

        # Adding model 'Forum'
        db.create_table('lbforum_forum', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('slug', self.gf('django.db.models.fields.SlugField')(
                max_length=110, db_index=True)),
            ('description',
             self.gf('django.db.models.fields.TextField')(default='')),
            ('ordering',
             self.gf('django.db.models.fields.PositiveIntegerField')(
                 default=1)),
            ('category', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['lbforum.Category'])),
            ('created_on', self.gf('django.db.models.fields.DateTimeField')(
                auto_now_add=True, blank=True)),
            ('updated_on', self.gf('django.db.models.fields.DateTimeField')(
                null=True, blank=True)),
            ('num_topics',
             self.gf('django.db.models.fields.IntegerField')(default=0)),
            ('num_posts',
             self.gf('django.db.models.fields.IntegerField')(default=0)),
            ('last_post', self.gf('django.db.models.fields.CharField')(
                max_length=255, blank=True)),
        ))
        db.send_create_signal('lbforum', ['Forum'])

        # Adding model 'Topic'
        db.create_table('lbforum_topic', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('forum', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['lbforum.Forum'])),
            ('posted_by',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['auth.User'])),
            ('subject',
             self.gf('django.db.models.fields.CharField')(max_length=999)),
            ('num_views',
             self.gf('django.db.models.fields.IntegerField')(default=0)),
            ('num_replies',
             self.gf('django.db.models.fields.PositiveSmallIntegerField')(
                 default=0)),
            ('created_on', self.gf('django.db.models.fields.DateTimeField')(
                auto_now_add=True, blank=True)),
            ('updated_on', self.gf('django.db.models.fields.DateTimeField')(
                null=True, blank=True)),
            ('last_reply_on', self.gf('django.db.models.fields.DateTimeField')(
                auto_now_add=True, blank=True)),
            ('last_post', self.gf('django.db.models.fields.CharField')(
                max_length=255, blank=True)),
            ('closed', self.gf('django.db.models.fields.BooleanField')(
                default=False, blank=True)),
            ('sticky', self.gf('django.db.models.fields.BooleanField')(
                default=False, blank=True)),
            ('hidden', self.gf('django.db.models.fields.BooleanField')(
                default=False, blank=True)),
        ))
        db.send_create_signal('lbforum', ['Topic'])

        # Adding model 'Post'
        db.create_table('lbforum_post', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('topic', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['lbforum.Topic'])),
            ('posted_by',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['auth.User'])),
            ('poster_ip',
             self.gf('django.db.models.fields.IPAddressField')(max_length=15)),
            ('topic_post', self.gf('django.db.models.fields.BooleanField')(
                default=False, blank=True)),
            ('message', self.gf('django.db.models.fields.TextField')()),
            ('created_on', self.gf('django.db.models.fields.DateTimeField')(
                auto_now_add=True, blank=True)),
            ('updated_on', self.gf('django.db.models.fields.DateTimeField')(
                null=True, blank=True)),
            ('edited_by', self.gf('django.db.models.fields.CharField')(
                max_length=255, blank=True)),
        ))
        db.send_create_signal('lbforum', ['Post'])

        # Adding M2M table for field attachments on 'Post'
        db.create_table(
            'lbforum_post_attachments',
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('post', models.ForeignKey(orm['lbforum.post'], null=False)),
             ('attachment',
              models.ForeignKey(orm['attachments.attachment'], null=False))))
        db.create_unique('lbforum_post_attachments',
                         ['post_id', 'attachment_id'])

        # Adding model 'LBForumUserProfile'
        db.create_table('lbforum_lbforumuserprofile', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user', self.gf('django.db.models.fields.related.OneToOneField')(
                related_name='lbforum_profile',
                unique=True,
                to=orm['auth.User'])),
            ('last_activity', self.gf('django.db.models.fields.DateTimeField')(
                auto_now_add=True, blank=True)),
            ('userrank', self.gf('django.db.models.fields.CharField')(
                default='Junior Member', max_length=30)),
            ('last_posttime', self.gf('django.db.models.fields.DateTimeField')(
                auto_now_add=True, blank=True)),
            ('signature', self.gf('django.db.models.fields.CharField')(
                max_length=1000, blank=True)),
        ))
        db.send_create_signal('lbforum', ['LBForumUserProfile'])
コード例 #38
0
    def forwards(self, orm):
        # Adding model 'Instance'
        db.create_table('cabotapp_instance', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.TextField')()),
            ('last_alert_sent',
             self.gf('django.db.models.fields.DateTimeField')(null=True,
                                                              blank=True)),
            ('email_alert',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('hipchat_alert',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('sms_alert',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('telephone_alert',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('alerts_enabled',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('overall_status',
             self.gf('django.db.models.fields.TextField')(default='PASSING')),
            ('old_overall_status',
             self.gf('django.db.models.fields.TextField')(default='PASSING')),
            ('hackpad_id', self.gf('django.db.models.fields.TextField')(
                null=True, blank=True)),
            ('address',
             self.gf('django.db.models.fields.TextField')(blank=True)),
        ))
        db.send_create_signal('cabotapp', ['Instance'])

        # Adding M2M table for field users_to_notify on 'Instance'
        db.create_table(
            'cabotapp_instance_users_to_notify',
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('instance',
              models.ForeignKey(orm['cabotapp.instance'], null=False)),
             ('user', models.ForeignKey(orm['auth.user'], null=False))))
        db.create_unique('cabotapp_instance_users_to_notify',
                         ['instance_id', 'user_id'])

        # Adding M2M table for field status_checks on 'Instance'
        db.create_table(
            'cabotapp_instance_status_checks',
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('instance',
              models.ForeignKey(orm['cabotapp.instance'], null=False)),
             ('statuscheck',
              models.ForeignKey(orm['cabotapp.statuscheck'], null=False))))
        db.create_unique('cabotapp_instance_status_checks',
                         ['instance_id', 'statuscheck_id'])

        # Adding M2M table for field instances on 'Service'
        db.create_table(
            'cabotapp_service_instances',
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('service', models.ForeignKey(orm['cabotapp.service'],
                                           null=False)),
             ('instance',
              models.ForeignKey(orm['cabotapp.instance'], null=False))))
        db.create_unique('cabotapp_service_instances',
                         ['service_id', 'instance_id'])
    def forwards(self, orm):
        """
        Added custom transaction processing for transactional DBMS.
        If a DDL operation fails, the entire transaction fails and all future commands are ignored.
        """

        # Adding model 'OozieStreamingAction'
        db.create_table('jobsub_ooziestreamingaction', (
            ('oozieaction_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['jobsub.OozieAction'], unique=True, primary_key=True)),
            ('files', self.gf('django.db.models.fields.CharField')(
                default='[]', max_length=512)),
            ('mapper',
             self.gf('django.db.models.fields.CharField')(max_length=512)),
            ('reducer',
             self.gf('django.db.models.fields.CharField')(max_length=512)),
            ('job_properties',
             self.gf('django.db.models.fields.TextField')(default='[]')),
            ('archives', self.gf('django.db.models.fields.CharField')(
                default='[]', max_length=512)),
        ))
        db.send_create_signal('jobsub', ['OozieStreamingAction'])

        # Adding model 'OozieAction'
        db.create_table('jobsub_oozieaction', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('action_type',
             self.gf('django.db.models.fields.CharField')(max_length=64)),
        ))
        db.send_create_signal('jobsub', ['OozieAction'])

        # Adding model 'OozieDesign'
        db.create_table('jobsub_ooziedesign', (
            ('description', self.gf('django.db.models.fields.CharField')(
                max_length=1024, blank=True)),
            ('last_modified', self.gf('django.db.models.fields.DateTimeField')(
                auto_now=True, blank=True)),
            ('owner', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['auth.User'])),
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('root_action',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['jobsub.OozieAction'])),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=64)),
        ))
        db.send_create_signal('jobsub', ['OozieDesign'])

        # Adding model 'JobHistory'
        db.create_table('jobsub_jobhistory', (
            ('owner', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['auth.User'])),
            ('submission_date',
             self.gf('django.db.models.fields.DateTimeField')(auto_now=True,
                                                              blank=True)),
            ('design', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['jobsub.OozieDesign'])),
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('job_id',
             self.gf('django.db.models.fields.CharField')(max_length=128)),
        ))
        db.send_create_signal('jobsub', ['JobHistory'])

        # Adding model 'OozieMapreduceAction'
        db.create_table('jobsub_ooziemapreduceaction', (
            ('oozieaction_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['jobsub.OozieAction'], unique=True, primary_key=True)),
            ('files', self.gf('django.db.models.fields.CharField')(
                default='[]', max_length=512)),
            ('jar_path',
             self.gf('django.db.models.fields.CharField')(max_length=512)),
            ('archives', self.gf('django.db.models.fields.CharField')(
                default='[]', max_length=512)),
            ('job_properties',
             self.gf('django.db.models.fields.TextField')(default='[]')),
        ))
        db.send_create_signal('jobsub', ['OozieMapreduceAction'])

        # Adding model 'OozieJavaAction'
        db.create_table('jobsub_ooziejavaaction', (
            ('oozieaction_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['jobsub.OozieAction'], unique=True, primary_key=True)),
            ('files', self.gf('django.db.models.fields.CharField')(
                default='[]', max_length=512)),
            ('jar_path',
             self.gf('django.db.models.fields.CharField')(max_length=512)),
            ('java_opts', self.gf('django.db.models.fields.CharField')(
                max_length=256, blank=True)),
            ('args', self.gf('django.db.models.fields.TextField')(blank=True)),
            ('job_properties',
             self.gf('django.db.models.fields.TextField')(default='[]')),
            ('archives', self.gf('django.db.models.fields.CharField')(
                default='[]', max_length=512)),
            ('main_class',
             self.gf('django.db.models.fields.CharField')(max_length=256)),
        ))
        db.send_create_signal('jobsub', ['OozieJavaAction'])

        # Adding field 'CheckForSetup.setup_level'
        db.add_column(
            'jobsub_checkforsetup',
            'setup_level',
            self.gf('django.db.models.fields.IntegerField')(default=0),
            keep_default=False)

        # The next sequence may fail... so they should have their own transactions.
        db.commit_transaction()

        # Delete legacy tables. Note that this only applies to Hue 1.x installations

        if 'jobsub_submission' in connection.introspection.table_names():
            db.start_transaction()
            db.delete_table('jobsub_submission')
            remove_content_type('jobsub', 'submission')
            db.commit_transaction()

        if 'jobsub_serversubmissionstate' in connection.introspection.table_names(
        ):
            db.start_transaction()
            db.delete_table('jobsub_serversubmissionstate')
            remove_content_type('jobsub', 'serversubmissionstate')
            db.commit_transaction()

        # South commits transaction at end of forward migration.
        db.start_transaction()
コード例 #40
0
ファイル: 0001_initial.py プロジェクト: sweettea/ESP-Website
    def forwards(self, orm):

        # Adding model 'StudentClassRegModuleInfo'
        db.create_table('modules_studentclassregmoduleinfo', (
            ('id', orm['modules.StudentClassRegModuleInfo:id']),
            ('module', orm['modules.StudentClassRegModuleInfo:module']),
            ('enforce_max',
             orm['modules.StudentClassRegModuleInfo:enforce_max']),
            ('class_cap_multiplier',
             orm['modules.StudentClassRegModuleInfo:class_cap_multiplier']),
            ('class_cap_offset',
             orm['modules.StudentClassRegModuleInfo:class_cap_offset']),
            ('signup_verb',
             orm['modules.StudentClassRegModuleInfo:signup_verb']),
            ('use_priority',
             orm['modules.StudentClassRegModuleInfo:use_priority']),
            ('priority_limit',
             orm['modules.StudentClassRegModuleInfo:priority_limit']),
            ('register_from_catalog',
             orm['modules.StudentClassRegModuleInfo:register_from_catalog']),
            ('visible_enrollments',
             orm['modules.StudentClassRegModuleInfo:visible_enrollments']),
            ('visible_meeting_times',
             orm['modules.StudentClassRegModuleInfo:visible_meeting_times']),
            ('show_unscheduled_classes',
             orm['modules.StudentClassRegModuleInfo:show_unscheduled_classes']
             ),
            ('confirm_button_text',
             orm['modules.StudentClassRegModuleInfo:confirm_button_text']),
            ('view_button_text',
             orm['modules.StudentClassRegModuleInfo:view_button_text']),
            ('cancel_button_text',
             orm['modules.StudentClassRegModuleInfo:cancel_button_text']),
            ('temporarily_full_text',
             orm['modules.StudentClassRegModuleInfo:temporarily_full_text']),
            ('cancel_button_dereg',
             orm['modules.StudentClassRegModuleInfo:cancel_button_dereg']),
            ('progress_mode',
             orm['modules.StudentClassRegModuleInfo:progress_mode']),
            ('send_confirmation',
             orm['modules.StudentClassRegModuleInfo:send_confirmation']),
            ('show_emailcodes',
             orm['modules.StudentClassRegModuleInfo:show_emailcodes']),
        ))
        db.send_create_signal('modules', ['StudentClassRegModuleInfo'])

        # Adding model 'RemoteProfile'
        db.create_table('modules_remoteprofile', (
            ('id', orm['modules.RemoteProfile:id']),
            ('user', orm['modules.RemoteProfile:user']),
            ('program', orm['modules.RemoteProfile:program']),
            ('volunteer', orm['modules.RemoteProfile:volunteer']),
            ('need_bus', orm['modules.RemoteProfile:need_bus']),
        ))
        db.send_create_signal('modules', ['RemoteProfile'])

        # Adding model 'ClassRegModuleInfo'
        db.create_table('modules_classregmoduleinfo', (
            ('id', orm['modules.ClassRegModuleInfo:id']),
            ('module', orm['modules.ClassRegModuleInfo:module']),
            ('allow_coteach', orm['modules.ClassRegModuleInfo:allow_coteach']),
            ('set_prereqs', orm['modules.ClassRegModuleInfo:set_prereqs']),
            ('display_times', orm['modules.ClassRegModuleInfo:display_times']),
            ('times_selectmultiple',
             orm['modules.ClassRegModuleInfo:times_selectmultiple']),
            ('class_max_duration',
             orm['modules.ClassRegModuleInfo:class_max_duration']),
            ('class_max_size',
             orm['modules.ClassRegModuleInfo:class_max_size']),
            ('class_size_step',
             orm['modules.ClassRegModuleInfo:class_size_step']),
            ('director_email',
             orm['modules.ClassRegModuleInfo:director_email']),
            ('class_durations',
             orm['modules.ClassRegModuleInfo:class_durations']),
            ('teacher_class_noedit',
             orm['modules.ClassRegModuleInfo:teacher_class_noedit']),
            ('allowed_sections',
             orm['modules.ClassRegModuleInfo:allowed_sections']),
            ('session_counts',
             orm['modules.ClassRegModuleInfo:session_counts']),
            ('num_teacher_questions',
             orm['modules.ClassRegModuleInfo:num_teacher_questions']),
            ('num_class_choices',
             orm['modules.ClassRegModuleInfo:num_class_choices']),
            ('color_code', orm['modules.ClassRegModuleInfo:color_code']),
            ('allow_lateness',
             orm['modules.ClassRegModuleInfo:allow_lateness']),
            ('ask_for_room', orm['modules.ClassRegModuleInfo:ask_for_room']),
            ('progress_mode', orm['modules.ClassRegModuleInfo:progress_mode']),
        ))
        db.send_create_signal('modules', ['ClassRegModuleInfo'])

        # Adding model 'SATPrepTeacherModuleInfo'
        db.create_table('modules_satprepteachermoduleinfo', (
            ('id', orm['modules.SATPrepTeacherModuleInfo:id']),
            ('sat_math', orm['modules.SATPrepTeacherModuleInfo:sat_math']),
            ('sat_writ', orm['modules.SATPrepTeacherModuleInfo:sat_writ']),
            ('sat_verb', orm['modules.SATPrepTeacherModuleInfo:sat_verb']),
            ('mitid', orm['modules.SATPrepTeacherModuleInfo:mitid']),
            ('subject', orm['modules.SATPrepTeacherModuleInfo:subject']),
            ('user', orm['modules.SATPrepTeacherModuleInfo:user']),
            ('program', orm['modules.SATPrepTeacherModuleInfo:program']),
            ('section', orm['modules.SATPrepTeacherModuleInfo:section']),
        ))
        db.send_create_signal('modules', ['SATPrepTeacherModuleInfo'])

        # Adding model 'ProgramModuleObj'
        db.create_table('modules_programmoduleobj', (
            ('id', orm['modules.ProgramModuleObj:id']),
            ('program', orm['modules.ProgramModuleObj:program']),
            ('module', orm['modules.ProgramModuleObj:module']),
            ('seq', orm['modules.ProgramModuleObj:seq']),
            ('required', orm['modules.ProgramModuleObj:required']),
        ))
        db.send_create_signal('modules', ['ProgramModuleObj'])

        # Adding model 'SATPrepAdminModuleInfo'
        db.create_table('modules_satprepadminmoduleinfo', (
            ('id', orm['modules.SATPrepAdminModuleInfo:id']),
            ('module', orm['modules.SATPrepAdminModuleInfo:module']),
            ('num_divisions',
             orm['modules.SATPrepAdminModuleInfo:num_divisions']),
        ))
        db.send_create_signal('modules', ['SATPrepAdminModuleInfo'])

        # Adding model 'DBReceipt'
        db.create_table('modules_dbreceipt', (
            ('id', orm['modules.DBReceipt:id']),
            ('action', orm['modules.DBReceipt:action']),
            ('program', orm['modules.DBReceipt:program']),
            ('receipt', orm['modules.DBReceipt:receipt']),
        ))
        db.send_create_signal('modules', ['DBReceipt'])

        # Adding ManyToManyField 'RemoteProfile.volunteer_times'
        db.create_table(
            'modules_remoteprofile_volunteer_times',
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('remoteprofile', models.ForeignKey(orm.RemoteProfile,
                                                 null=False)),
             ('event', models.ForeignKey(orm['cal.Event'], null=False))))

        # Adding ManyToManyField 'RemoteProfile.bus_runs'
        db.create_table(
            'modules_remoteprofile_bus_runs',
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('remoteprofile', models.ForeignKey(orm.RemoteProfile,
                                                 null=False)),
             ('datatree',
              models.ForeignKey(orm['datatree.DataTree'], null=False))))
    def forwards(self, orm):
        # Adding model 'Target_File'
        db.create_table(u'orm_target_file', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('target', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['orm.Target'])),
            ('path',
             self.gf('django.db.models.fields.FilePathField')(max_length=100)),
            ('size', self.gf('django.db.models.fields.IntegerField')()),
            ('inodetype', self.gf('django.db.models.fields.IntegerField')()),
            ('permission', self.gf('django.db.models.fields.IntegerField')()),
            ('owner',
             self.gf('django.db.models.fields.CharField')(max_length=128)),
            ('group',
             self.gf('django.db.models.fields.CharField')(max_length=128)),
            ('directory',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='directory_set', to=orm['orm.Target_File'])),
            ('sym_target',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='symlink_set',
                 blank=True,
                 to=orm['orm.Target_File'])),
        ))
        db.send_create_signal(u'orm', ['Target_File'])

        # Adding model 'Target_Image_File'
        db.create_table(u'orm_target_image_file', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('target', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['orm.Target'])),
            ('file_name',
             self.gf('django.db.models.fields.FilePathField')(max_length=100)),
            ('file_size', self.gf('django.db.models.fields.IntegerField')()),
        ))
        db.send_create_signal(u'orm', ['Target_Image_File'])

        # Adding field 'VariableHistory.value'
        db.add_column(u'orm_variablehistory',
                      'value',
                      self.gf('django.db.models.fields.TextField')(default='',
                                                                   blank=True),
                      keep_default=False)

        # Deleting field 'Recipe.licensing_info'
        db.delete_column(u'orm_recipe', 'licensing_info')

        # Deleting field 'Target.file_name'
        db.delete_column(u'orm_target', 'file_name')

        # Deleting field 'Target.file_size'
        db.delete_column(u'orm_target', 'file_size')

        # Deleting field 'Build.image_fstypes'
        db.delete_column(u'orm_build', 'image_fstypes')

        # Adding field 'LogMessage.task'
        db.add_column(u'orm_logmessage',
                      'task',
                      self.gf('django.db.models.fields.related.ForeignKey')(
                          to=orm['orm.Task'], null=True, blank=True),
                      keep_default=False)

        # Changing field 'Task.elapsed_time'
        db.alter_column(
            u'orm_task', 'elapsed_time',
            self.gf('django.db.models.fields.DecimalField')(null=True,
                                                            max_digits=6,
                                                            decimal_places=2))
        # Adding unique constraint on 'Task', fields ['build', 'recipe', 'task_name']
        db.create_unique(u'orm_task', ['build_id', 'recipe_id', 'task_name'])
コード例 #42
0
    def forwards(self, orm):
        # Adding model 'UserProfile'
        db.create_table('swe_userprofile', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)),
            ('activation_key', self.gf('django.db.models.fields.CharField')(max_length=40)),
            ('key_expires', self.gf('django.db.models.fields.DateTimeField')()),
            ('active_email', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('active_email_confirmed', self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('swe', ['UserProfile'])

        # Adding model 'Document'
        db.create_table('swe_document', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('manuscript_file_key', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('original_name', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('is_upload_confirmed', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('datetime_uploaded', self.gf('django.db.models.fields.DateTimeField')()),
            ('notes', self.gf('django.db.models.fields.CharField')(max_length=1000, null=True, blank=True)),
        ))
        db.send_create_signal('swe', ['Document'])

        # Adding model 'SubjectList'
        db.create_table('swe_subjectlist', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('is_active', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('date_activated', self.gf('django.db.models.fields.DateTimeField')(null=True)),
        ))
        db.send_create_signal('swe', ['SubjectList'])

        # Adding model 'SubjectCategory'
        db.create_table('swe_subjectcategory', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('subjectlist', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['swe.SubjectList'])),
            ('display_text', self.gf('django.db.models.fields.CharField')(max_length=40)),
            ('display_order', self.gf('django.db.models.fields.IntegerField')()),
        ))
        db.send_create_signal('swe', ['SubjectCategory'])

        # Adding model 'Subject'
        db.create_table('swe_subject', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('subjectcategory', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['swe.SubjectCategory'])),
            ('display_text', self.gf('django.db.models.fields.CharField')(max_length=40)),
            ('display_order', self.gf('django.db.models.fields.IntegerField')()),
            ('is_enabled', self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('swe', ['Subject'])

        # Adding model 'ServiceList'
        db.create_table('swe_servicelist', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('is_active', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('date_activated', self.gf('django.db.models.fields.DateTimeField')(null=True)),
        ))
        db.send_create_signal('swe', ['ServiceList'])

        # Adding model 'WordCountRange'
        db.create_table('swe_wordcountrange', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('servicelist', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['swe.ServiceList'])),
            ('min_words', self.gf('django.db.models.fields.IntegerField')(null=True)),
            ('max_words', self.gf('django.db.models.fields.IntegerField')(null=True)),
        ))
        db.send_create_signal('swe', ['WordCountRange'])

        # Adding model 'ServiceType'
        db.create_table('swe_servicetype', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('servicelist', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['swe.ServiceList'])),
            ('display_text', self.gf('django.db.models.fields.CharField')(max_length=40)),
            ('display_order', self.gf('django.db.models.fields.IntegerField')()),
            ('hours_until_due', self.gf('django.db.models.fields.IntegerField')()),
            ('show_in_price_table', self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('swe', ['ServiceType'])

        # Adding model 'PricePoint'
        db.create_table('swe_pricepoint', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('wordcountrange', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['swe.WordCountRange'])),
            ('servicetype', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['swe.ServiceType'])),
            ('dollars', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=7, decimal_places=2)),
            ('dollars_per_word', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=7, decimal_places=3)),
            ('is_price_per_word', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('display_order', self.gf('django.db.models.fields.IntegerField')()),
        ))
        db.send_create_signal('swe', ['PricePoint'])

        # Adding model 'Coupon'
        db.create_table('swe_coupon', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('display_text', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('code', self.gf('django.db.models.fields.CharField')(max_length=20)),
            ('dollars_off', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=7, decimal_places=2)),
            ('is_by_percent', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('percent_off', self.gf('django.db.models.fields.IntegerField')(null=True)),
            ('expiration_date', self.gf('django.db.models.fields.DateTimeField')()),
            ('is_limited_to_select_users', self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('swe', ['Coupon'])

        # Adding M2M table for field enabled_users on 'Coupon'
        db.create_table('swe_coupon_enabled_users', (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('coupon', models.ForeignKey(orm['swe.coupon'], null=False)),
            ('user', models.ForeignKey(orm['auth.user'], null=False))
        ))
        db.create_unique('swe_coupon_enabled_users', ['coupon_id', 'user_id'])

        # Adding model 'ManuscriptOrder'
        db.create_table('swe_manuscriptorder', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('invoice_id', self.gf('django.db.models.fields.IntegerField')(null=True)),
            ('customer', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
            ('title', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('subject', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['swe.Subject'], null=True)),
            ('servicetype', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['swe.ServiceType'], null=True)),
            ('wordcountrange', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['swe.WordCountRange'], null=True)),
            ('pricepoint', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['swe.PricePoint'], null=True)),
            ('word_count_exact', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
            ('current_document_version', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['swe.Document'], null=True)),
            ('price_full', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=7, decimal_places=2)),
            ('price_after_discounts', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=7, decimal_places=2)),
            ('paypal_ipn_id', self.gf('django.db.models.fields.IntegerField')(null=True)),
            ('datetime_submitted', self.gf('django.db.models.fields.DateTimeField')(null=True)),
            ('datetime_due', self.gf('django.db.models.fields.DateTimeField')(null=True)),
            ('is_payment_complete', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('is_editing_complete', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('was_customer_notified', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('did_customer_retrieve', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('managing_editor', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='manuscriptorder_managed_set', null=True, to=orm['auth.User'])),
        ))
        db.send_create_signal('swe', ['ManuscriptOrder'])

        # Adding M2M table for field coupons on 'ManuscriptOrder'
        db.create_table('swe_manuscriptorder_coupons', (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('manuscriptorder', models.ForeignKey(orm['swe.manuscriptorder'], null=False)),
            ('coupon', models.ForeignKey(orm['swe.coupon'], null=False))
        ))
        db.create_unique('swe_manuscriptorder_coupons', ['manuscriptorder_id', 'coupon_id'])

        # Adding model 'OriginalDocument'
        db.create_table('swe_originaldocument', (
            ('document_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['swe.Document'], unique=True, primary_key=True)),
            ('manuscriptorder', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['swe.ManuscriptOrder'], unique=True)),
        ))
        db.send_create_signal('swe', ['OriginalDocument'])

        # Adding model 'EditedDocument'
        db.create_table('swe_editeddocument', (
            ('parent_document', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['swe.Document'], unique=True, primary_key=True)),
        ))
        db.send_create_signal('swe', ['EditedDocument'])

        # Adding model 'ManuscriptEdit'
        db.create_table('swe_manuscriptedit', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('manuscriptorder', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['swe.ManuscriptOrder'])),
            ('starting_document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['swe.Document'])),
            ('editeddocument', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['swe.EditedDocument'], unique=True, null=True, blank=True)),
            ('editor', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)),
            ('is_open', self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('swe', ['ManuscriptEdit'])
コード例 #43
0
    def forwards(self, orm):
        # Adding model 'Image'
        db.create_table('image', (
            ('image_id', self.gf('django.db.models.fields.IntegerField')(
                primary_key=True, db_column='image_id')),
            ('path', self.gf('django.db.models.fields.FilePathField')(
                max_length=100, db_column='path')),
            ('is_main', self.gf('django.db.models.fields.BooleanField')(
                default=False, max_length=1)),
            ('deleted',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('web', ['Image'])

        # Adding model 'UserProfile'
        db.create_table('user_profile', (
            ('user_profile_id',
             self.gf('django.db.models.fields.IntegerField')(
                 primary_key=True, db_column='user_profile_id')),
            ('user', self.gf('django.db.models.fields.related.OneToOneField')(
                to=orm['auth.User'], unique=True)),
            ('profile_image',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['web.Image'],
                 unique=True,
                 null=True,
                 db_column='profile_image_id')),
            ('biography',
             self.gf('django.db.models.fields.CharField')(max_length=300)),
            ('deleted',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('web', ['UserProfile'])

        # Adding unique constraint on 'UserProfile', fields ['user_profile_id', 'user']
        db.create_unique('user_profile', ['user_profile_id', 'user_id'])

        # Adding model 'Author'
        db.create_table('author', (
            ('author_id', self.gf('django.db.models.fields.IntegerField')(
                primary_key=True, db_column='author_id')),
            ('user_profile',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['web.UserProfile'],
                 unique=True,
                 null=True,
                 db_column='user_profile_id')),
            ('added_by', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='added_by_user',
                db_column='added_by',
                to=orm['web.UserProfile'])),
            ('image', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['web.Image'], unique=True, null=True)),
            ('first_name', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('last_name', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('biography', self.gf('django.db.models.fields.CharField')(
                max_length=1000, null=True)),
            ('description',
             self.gf('django.db.models.fields.CharField')(max_length=300)),
            ('deleted',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('web', ['Author'])

        # Adding model 'Article'
        db.create_table('article', (
            ('article_id', self.gf('django.db.models.fields.IntegerField')(
                primary_key=True)),
            ('author', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['web.Author'], null=True)),
            ('title',
             self.gf('django.db.models.fields.CharField')(max_length=80)),
            ('content_summary',
             self.gf('django.db.models.fields.CharField')(max_length=1000)),
            ('body_text',
             self.gf('django.db.models.fields.CharField')(max_length=15000)),
            ('visits',
             self.gf('django.db.models.fields.BigIntegerField')(default=0)),
            ('deleted',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('web', ['Article'])

        # Adding model 'Poll'
        db.create_table('poll', (
            ('poll_id', self.gf('django.db.models.fields.IntegerField')(
                primary_key=True, db_column='poll_id')),
            ('title',
             self.gf('django.db.models.fields.CharField')(max_length=60)),
            ('description',
             self.gf('django.db.models.fields.CharField')(max_length=300)),
            ('multiple_choice',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('voting_period_start',
             self.gf('django.db.models.fields.DateTimeField')()),
            ('voting_period_end',
             self.gf('django.db.models.fields.DateTimeField')()),
            ('deleted',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('editable',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
        ))
        db.send_create_signal('web', ['Poll'])

        # Adding model 'Choice'
        db.create_table('choice', (
            ('poll', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['web.Poll'], db_column='poll_id')),
            ('choice_id', self.gf('django.db.models.fields.IntegerField')(
                primary_key=True, db_column='choice_id')),
            ('text',
             self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('deleted',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('web', ['Choice'])

        # Adding unique constraint on 'Choice', fields ['poll', 'choice_id']
        db.create_unique('choice', ['poll_id', 'choice_id'])

        # Adding model 'Publication'
        db.create_table('publication', (
            ('publication_id', self.gf('django.db.models.fields.IntegerField')(
                primary_key=True, db_column='publication_id')),
            ('article',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['web.Article'],
                 unique=True,
                 null=True,
                 db_column='article_id')),
            ('poll', self.gf('django.db.models.fields.related.OneToOneField')(
                to=orm['web.Poll'],
                unique=True,
                null=True,
                db_column='poll_id')),
            ('user_profile',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['web.UserProfile'], db_column='user_profile_id')),
            ('date', self.gf('django.db.models.fields.DateTimeField')(
                db_column='date')),
            ('deleted',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('web', ['Publication'])

        # Adding model 'Section'
        db.create_table('section', (
            ('section_id', self.gf('django.db.models.fields.IntegerField')(
                primary_key=True, db_column='section_id')),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=30)),
            ('deleted',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('web', ['Section'])

        # Adding model 'ArticleSection'
        db.create_table('article_section', (
            ('article_section_id',
             self.gf('django.db.models.fields.IntegerField')(
                 primary_key=True, db_column='article_section_id')),
            ('section', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['web.Section'], db_column='section_id')),
            ('article', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['web.Article'], db_column='article_id')),
        ))
        db.send_create_signal('web', ['ArticleSection'])

        # Adding unique constraint on 'ArticleSection', fields ['article', 'section']
        db.create_unique('article_section', ['article_id', 'section_id'])

        # Adding model 'PollSection'
        db.create_table('poll_section', (
            ('poll_section_id',
             self.gf('django.db.models.fields.IntegerField')(
                 primary_key=True, db_column='poll_section_id')),
            ('section', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['web.Section'], db_column='section_id')),
            ('poll', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['web.Poll'], db_column='poll_id')),
        ))
        db.send_create_signal('web', ['PollSection'])

        # Adding unique constraint on 'PollSection', fields ['poll', 'section']
        db.create_unique('poll_section', ['poll_id', 'section_id'])

        # Adding model 'Source'
        db.create_table('source', (
            ('article', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['web.Article'], db_column='article_id')),
            ('source_id', self.gf('django.db.models.fields.IntegerField')(
                primary_key=True, db_column='source_id')),
            ('url',
             self.gf('django.db.models.fields.CharField')(max_length=2000)),
            ('deleted',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('web', ['Source'])

        # Adding unique constraint on 'Source', fields ['article', 'source_id']
        db.create_unique('source', ['article_id', 'source_id'])

        # Adding model 'Tag'
        db.create_table('tag', (
            ('article', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['web.Article'], db_column='article_id')),
            ('tag_id', self.gf('django.db.models.fields.IntegerField')(
                primary_key=True, db_column='tag_id')),
            ('text',
             self.gf('django.db.models.fields.CharField')(max_length=30)),
            ('deleted',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('moderated',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('web', ['Tag'])

        # Adding unique constraint on 'Tag', fields ['article', 'tag_id']
        db.create_unique('tag', ['article_id', 'tag_id'])

        # Adding model 'Vote'
        db.create_table('vote', (
            ('poll', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['web.Poll'], db_column='poll_id')),
            ('choice', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['web.Choice'], db_column='choice_id')),
            ('vote_id', self.gf('django.db.models.fields.IntegerField')(
                primary_key=True, db_column='vote_id')),
            ('user_profile',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['web.UserProfile'], db_column='user_profile_id')),
            ('deleted',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('web', ['Vote'])

        # Adding unique constraint on 'Vote', fields ['poll', 'vote_id', 'choice']
        db.create_unique('vote', ['poll_id', 'vote_id', 'choice_id'])

        # Adding model 'ArticleRate'
        db.create_table('article_rate', (
            ('article', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['web.Article'], db_column='article_id')),
            ('article_rate_id',
             self.gf('django.db.models.fields.IntegerField')(
                 primary_key=True)),
            ('user_profile',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['web.UserProfile'], db_column='user_profile_id')),
            ('rating',
             self.gf('django.db.models.fields.PositiveSmallIntegerField')(
                 default=0)),
            ('date', self.gf('django.db.models.fields.DateTimeField')()),
        ))
        db.send_create_signal('web', ['ArticleRate'])

        # Adding unique constraint on 'ArticleRate', fields ['article', 'user_profile']
        db.create_unique('article_rate', ['article_id', 'user_profile_id'])

        # Adding model 'AuthorRate'
        db.create_table('author_rate', (
            ('author', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['web.Author'], db_column='author_id')),
            ('author_rate_id', self.gf('django.db.models.fields.IntegerField')(
                primary_key=True)),
            ('user_profile',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['web.UserProfile'], db_column='user_profile_id')),
            ('rating',
             self.gf('django.db.models.fields.PositiveSmallIntegerField')(
                 default=0)),
            ('date', self.gf('django.db.models.fields.DateTimeField')()),
        ))
        db.send_create_signal('web', ['AuthorRate'])

        # Adding unique constraint on 'AuthorRate', fields ['author', 'author_rate_id']
        db.create_unique('author_rate', ['author_id', 'author_rate_id'])

        # Adding model 'PublisherRate'
        db.create_table('publisher_rate', (
            ('pub_user_profile',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='pub_user_profile',
                 db_column='pub_user_profile_id',
                 to=orm['web.UserProfile'])),
            ('publisher_rate_id',
             self.gf('django.db.models.fields.IntegerField')(
                 primary_key=True)),
            ('user_profile',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['web.UserProfile'], db_column='user_profile_id')),
            ('rating',
             self.gf('django.db.models.fields.PositiveSmallIntegerField')(
                 default=0)),
            ('date', self.gf('django.db.models.fields.DateTimeField')()),
        ))
        db.send_create_signal('web', ['PublisherRate'])

        # Adding unique constraint on 'PublisherRate', fields ['pub_user_profile', 'publisher_rate_id']
        db.create_unique('publisher_rate',
                         ['pub_user_profile_id', 'publisher_rate_id'])

        # Adding model 'Comment'
        db.create_table('comment', (
            ('article', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['web.Article'], db_column='article_id')),
            ('comment_id', self.gf('django.db.models.fields.IntegerField')(
                primary_key=True, db_column='comment_id')),
            ('user_profile',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['web.UserProfile'], db_column='user_profile_id')),
            ('content',
             self.gf('django.db.models.fields.CharField')(max_length=400)),
            ('deleted',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('moderated',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('web', ['Comment'])

        # Adding unique constraint on 'Comment', fields ['article', 'comment_id']
        db.create_unique('comment', ['article_id', 'comment_id'])

        # Adding model 'ArticleImage'
        db.create_table('article_image', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('article',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['web.Article'],
                 unique=True,
                 null=True,
                 db_column='article_id')),
            ('image', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['web.Image'],
                unique=True,
                null=True,
                db_column='image_id')),
        ))
        db.send_create_signal('web', ['ArticleImage'])

        # Adding unique constraint on 'ArticleImage', fields ['article', 'image']
        db.create_unique('article_image', ['article_id', 'image_id'])
コード例 #44
0
 def forwards(self, orm):
     # Adding model 'List'
     db.create_table(u'lists_list', (
         (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
     ))
     db.send_create_signal(u'lists', ['List'])
コード例 #45
0
    def forwards(self, orm):
        # Adding model 'Player'
        db.create_table('game_player', (
            ('about_me', self.gf('django.db.models.fields.TextField')(
                null=True, blank=True)),
            ('facebook_id', self.gf('django.db.models.fields.BigIntegerField')(
                unique=True, null=True, blank=True)),
            ('access_token', self.gf('django.db.models.fields.TextField')(
                null=True, blank=True)),
            ('facebook_name', self.gf('django.db.models.fields.CharField')(
                max_length=255, null=True, blank=True)),
            ('facebook_profile_url',
             self.gf('django.db.models.fields.TextField')(null=True,
                                                          blank=True)),
            ('website_url', self.gf('django.db.models.fields.TextField')(
                null=True, blank=True)),
            ('blog_url', self.gf('django.db.models.fields.TextField')(
                null=True, blank=True)),
            ('date_of_birth', self.gf('django.db.models.fields.DateField')(
                null=True, blank=True)),
            ('gender', self.gf('django.db.models.fields.CharField')(
                max_length=1, null=True, blank=True)),
            ('raw_data', self.gf('django.db.models.fields.TextField')(
                null=True, blank=True)),
            ('facebook_open_graph',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('image', self.gf('django.db.models.fields.files.ImageField')(
                max_length=255, null=True, blank=True)),
            ('user', self.gf('django.db.models.fields.related.OneToOneField')(
                to=orm['auth.User'], unique=True, primary_key=True)),
            ('is_ai',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('logged_in',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('available_for_random_play',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('available_for_friend_play',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('last_played_on',
             self.gf('django.db.models.fields.DateTimeField')(
                 default=datetime.datetime(2013, 2, 17, 0, 0))),
        ))
        db.send_create_signal('game', ['Player'])

        # Adding model 'Game'
        db.create_table('game_game', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('status', self.gf('django.db.models.fields.CharField')(
                default='not_started', max_length=15)),
            ('white_player',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='games_white_set', to=orm['game.Player'])),
            ('black_player',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='games_black_set', to=orm['game.Player'])),
            ('created_on', self.gf('django.db.models.fields.DateTimeField')(
                auto_now_add=True, blank=True)),
            ('board', self.gf('picklefield.fields.PickledObjectField')()),
            ('moves', self.gf('picklefield.fields.PickledObjectField')()),
            ('next_player', self.gf('django.db.models.fields.CharField')(
                default='white', max_length=5)),
        ))
        db.send_create_signal('game', ['Game'])
コード例 #46
0
ファイル: 0001_initial.py プロジェクト: hakerskipl/pnd
    def forwards(self, orm):
        # Adding model 'Place'
        db.create_table(u'pnd_place', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=150)),
            ('slug', self.gf('autoslug.fields.AutoSlugField')(
                unique=True,
                max_length=50,
                populate_from='name',
                unique_with=())),
            ('short', self.gf('django.db.models.fields.TextField')(null=True)),
            ('desc', self.gf('django.db.models.fields.TextField')(null=True)),
            ('address',
             self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('hour_open',
             self.gf('django.db.models.fields.TimeField')(null=True)),
            ('hour_close',
             self.gf('django.db.models.fields.TimeField')(null=True)),
            ('phone', self.gf('django.db.models.fields.CharField')(
                max_length=20, null=True)),
            ('email', self.gf('django.db.models.fields.EmailField')(
                max_length=75, null=True)),
            ('website', self.gf('django.db.models.fields.URLField')(
                max_length=200, null=True)),
            ('places_uid',
             self.gf('django.db.models.fields.TextField')(null=True)),
        ))
        db.send_create_signal(u'pnd', ['Place'])

        # Adding M2M table for field tags on 'Place'
        db.create_table(
            u'pnd_place_tags',
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('place', models.ForeignKey(orm[u'pnd.place'], null=False)),
             ('tags', models.ForeignKey(orm[u'pnd.tags'], null=False))))
        db.create_unique(u'pnd_place_tags', ['place_id', 'tags_id'])

        # Adding model 'Tags'
        db.create_table(u'pnd_tags', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('icon',
             self.gf('django.db.models.fields.CharField')(max_length=50)),
        ))
        db.send_create_signal(u'pnd', ['Tags'])

        # Adding model 'PlaceTables'
        db.create_table(u'pnd_placetables', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('place', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='tables', to=orm['pnd.Place'])),
            ('table',
             self.gf('django.db.models.fields.PositiveSmallIntegerField')()),
            ('quantity',
             self.gf('django.db.models.fields.PositiveSmallIntegerField')()),
        ))
        db.send_create_signal(u'pnd', ['PlaceTables'])

        # Adding model 'PlacePhotos'
        db.create_table(u'pnd_placephotos', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('place', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='photos', to=orm['pnd.Place'])),
            ('photo', self.gf('django.db.models.fields.files.ImageField')(
                max_length=100)),
            ('photo_thumbnail',
             self.gf('imagekit.models.fields.ProcessedImageField')(
                 max_length=100)),
            ('desc', self.gf('django.db.models.fields.TextField')(default=None,
                                                                  null=True)),
        ))
        db.send_create_signal(u'pnd', ['PlacePhotos'])

        # Adding model 'PlaceMenu'
        db.create_table(u'pnd_placemenu', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('place', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='menu', to=orm['pnd.Place'])),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=150)),
            ('desc', self.gf('django.db.models.fields.TextField')()),
            ('price', self.gf('django.db.models.fields.DecimalField')(
                default=0.0, max_digits=5, decimal_places=2)),
        ))
        db.send_create_signal(u'pnd', ['PlaceMenu'])

        # Adding model 'TodaysIdea'
        db.create_table(u'pnd_todaysidea', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('place', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='pomysly', to=orm['pnd.Place'])),
            ('date', self.gf('django.db.models.fields.DateField')(
                default=datetime.datetime(2013, 4, 10, 0, 0))),
            ('slogan', self.gf('django.db.models.fields.CharField')(
                default=None, max_length=150, null=True)),
            ('photo', self.gf('imagekit.models.fields.ProcessedImageField')(
                default=None, max_length=100, null=True)),
        ))
        db.send_create_signal(u'pnd', ['TodaysIdea'])
コード例 #47
0
ファイル: 0001_initial.py プロジェクト: cswxin/bmw_apq
    def forwards(self, orm):
        
        # Adding model 'Project'
        db.create_table('survey_project', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
            ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
        ))
        db.send_create_signal('survey', ['Project'])

        # Adding model 'Question'
        db.create_table('survey_question', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('title', self.gf('django.db.models.fields.TextField')(max_length=10000, null=True, blank=True)),
            ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.Project'], null=True, blank=True)),
            ('cid', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
            ('questiontype', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
            ('listorder', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
            ('base_question', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.Question'], null=True, blank=True)),
            ('other_type', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
            ('max_answer_num', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
            ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
        ))
        db.send_create_signal('survey', ['Question'])

        # Adding model 'QuestionQA'
        db.create_table('survey_questionqa', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('question', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.Question'])),
            ('q_desc', self.gf('django.db.models.fields.TextField')(max_length=1000, null=True, blank=True)),
            ('a_desc', self.gf('django.db.models.fields.TextField')(max_length=1000, null=True, blank=True)),
            ('q_addon', self.gf('django.db.models.fields.TextField')(max_length=1000, null=True, blank=True)),
            ('q_desc_en', self.gf('django.db.models.fields.TextField')(max_length=1000, null=True, blank=True)),
            ('a_desc_en', self.gf('django.db.models.fields.TextField')(max_length=1000, null=True, blank=True)),
            ('q_addon_en', self.gf('django.db.models.fields.TextField')(max_length=1000, null=True, blank=True)),
            ('q_en', self.gf('django.db.models.fields.TextField')(max_length=1000, null=True, blank=True)),
        ))
        db.send_create_signal('survey', ['QuestionQA'])

        # Adding model 'QuestionAttribute'
        db.create_table('survey_questionattribute', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('question', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.Question'], null=True, blank=True)),
            ('attr_name', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
            ('attr_value', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
        ))
        db.send_create_signal('survey', ['QuestionAttribute'])

        # Adding model 'Alternative'
        db.create_table('survey_alternative', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('title', self.gf('django.db.models.fields.TextField')(max_length=1000, null=True, blank=True)),
            ('cid', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
            ('question', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.Question'], null=True, blank=True)),
            ('open', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('listorder', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
            ('score', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
            ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
        ))
        db.send_create_signal('survey', ['Alternative'])

        # Adding model 'AlternativeAttribute'
        db.create_table('survey_alternativeattribute', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('alternative', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.Alternative'], null=True, blank=True)),
            ('attr_name', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
            ('attr_value', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
        ))
        db.send_create_signal('survey', ['AlternativeAttribute'])

        # Adding model 'MatrixRow'
        db.create_table('survey_matrixrow', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('title', self.gf('django.db.models.fields.TextField')(max_length=1000, null=True, blank=True)),
            ('cid', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
            ('question', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.Question'], null=True, blank=True)),
            ('listorder', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
            ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
        ))
        db.send_create_signal('survey', ['MatrixRow'])

        # Adding model 'MatrixRowAttribute'
        db.create_table('survey_matrixrowattribute', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('matrixrow', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.MatrixRow'], null=True, blank=True)),
            ('attr_name', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
            ('attr_value', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
        ))
        db.send_create_signal('survey', ['MatrixRowAttribute'])

        # Adding model 'Validator'
        db.create_table('survey_validator', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
            ('func', self.gf('django.db.models.fields.TextField')(max_length=1000, null=True, blank=True)),
            ('error_tip', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
            ('desc', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
        ))
        db.send_create_signal('survey', ['Validator'])

        # Adding model 'InputValidator'
        db.create_table('survey_inputvalidator', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('question', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.Question'], null=True, blank=True)),
            ('alternative', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.Alternative'], null=True, blank=True)),
            ('matrixrow', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.MatrixRow'], null=True, blank=True)),
            ('min', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
            ('max', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
            ('validator', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.Validator'], null=True, blank=True)),
        ))
        db.send_create_signal('survey', ['InputValidator'])

        # Adding model 'Respondent'
        db.create_table('survey_respondent', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('status', self.gf('django.db.models.fields.IntegerField')(default=0)),
            ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.Project'], null=True, blank=True)),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)),
            ('start_time', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
            ('finish_time', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
        ))
        db.send_create_signal('survey', ['Respondent'])

        # Adding model 'CheckPoint'
        db.create_table('survey_checkpoint', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
            ('name_abbr', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
            ('desc', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
            ('desc_en', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
            ('question', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.Question'], null=True, blank=True)),
            ('alternative', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.Alternative'], null=True, blank=True)),
            ('matrixrow', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.MatrixRow'], null=True, blank=True)),
            ('parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.CheckPoint'], null=True, blank=True)),
            ('has_child', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('resp_col', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
        ))
        db.send_create_signal('survey', ['CheckPoint'])

        # Adding model 'Translation'
        db.create_table('survey_translation', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('respondent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.Respondent'], null=True, blank=True)),
            ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.Project'], null=True, blank=True)),
            ('column_name', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
            ('content_en', self.gf('django.db.models.fields.TextField')(max_length=1000, null=True, blank=True)),
        ))
        db.send_create_signal('survey', ['Translation'])
コード例 #48
0
    def forwards(self, orm):
        # Adding model 'PCVProfile'
        db.create_table(u'pcvcore_pcvprofile', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('is_pcv',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('user', self.gf('django.db.models.fields.related.OneToOneField')(
                to=orm['auth.User'], unique=True)),
            ('country', self.gf('django.db.models.fields.CharField')(
                max_length=128, blank=True)),
            ('sector', self.gf('django.db.models.fields.CharField')(
                max_length=128, blank=True)),
            ('start_date', self.gf('django.db.models.fields.DateField')(
                null=True, blank=True)),
            ('end_date', self.gf('django.db.models.fields.DateField')(
                null=True, blank=True)),
            ('address', self.gf('django.db.models.fields.CharField')(
                max_length=128, blank=True)),
            ('bio', self.gf('django.db.models.fields.TextField')(blank=True)),
        ))
        db.send_create_signal(u'pcvcore', ['PCVProfile'])

        # Adding model 'School'
        db.create_table(u'pcvcore_school', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('city', self.gf('django.db.models.fields.CharField')(
                max_length=128, blank=True)),
            ('state', self.gf('django.db.models.fields.CharField')(
                max_length=128, blank=True)),
            ('school_name',
             self.gf('django.db.models.fields.CharField')(max_length=128)),
            ('zip_code', self.gf('django.db.models.fields.CharField')(
                max_length=10, blank=True)),
            ('about',
             self.gf('django.db.models.fields.TextField')(blank=True)),
        ))
        db.send_create_signal(u'pcvcore', ['School'])

        # Adding model 'Teacher'
        db.create_table(u'pcvcore_teacher', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('is_pcv',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('user', self.gf('django.db.models.fields.related.OneToOneField')(
                to=orm['auth.User'], unique=True)),
            ('school', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['pcvcore.School'], null=True, blank=True)),
            ('grade', self.gf('django.db.models.fields.CharField')(
                max_length=5, blank=True)),
            ('following',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 blank=True,
                 related_name='following',
                 null=True,
                 to=orm['auth.User'])),
            ('address', self.gf('django.db.models.fields.CharField')(
                max_length=128, blank=True)),
            ('bio', self.gf('django.db.models.fields.TextField')(blank=True)),
        ))
        db.send_create_signal(u'pcvcore', ['Teacher'])
コード例 #49
0
    def forwards(self, orm):
        # Adding model 'Micro_test_other'
        db.create_table(u'opal_micro_test_other', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_other'])

        # Adding model 'Duration'
        db.create_table(u'opal_duration', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Duration'])

        # Adding model 'Symptom'
        db.create_table(u'opal_symptom', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Symptom'])

        # Adding model 'Micro_test_single_test_pos_neg_equiv'
        db.create_table(u'opal_micro_test_single_test_pos_neg_equiv', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_single_test_pos_neg_equiv'])

        # Adding model 'Micro_test_single_igg_test'
        db.create_table(u'opal_micro_test_single_igg_test', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_single_igg_test'])

        # Adding model 'Micro_test_stool_parasitology_pcr'
        db.create_table(u'opal_micro_test_stool_parasitology_pcr', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_stool_parasitology_pcr'])

        # Adding model 'Micro_test_viral_load'
        db.create_table(u'opal_micro_test_viral_load', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_viral_load'])

        # Adding model 'Antimicrobial_adverse_event'
        db.create_table(u'opal_antimicrobial_adverse_event', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Antimicrobial_adverse_event'])

        # Adding model 'Antimicrobial_frequency'
        db.create_table(u'opal_antimicrobial_frequency', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Antimicrobial_frequency'])

        # Adding model 'Micro_test_c_difficile'
        db.create_table(u'opal_micro_test_c_difficile', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_c_difficile'])

        # Adding model 'Clinical_advice_reason_for_interaction'
        db.create_table(u'opal_clinical_advice_reason_for_interaction', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Clinical_advice_reason_for_interaction'])

        # Adding model 'Travel_reason'
        db.create_table(u'opal_travel_reason', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Travel_reason'])

        # Adding model 'Micro_test_hepititis_b_serology'
        db.create_table(u'opal_micro_test_hepititis_b_serology', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_hepititis_b_serology'])

        # Adding model 'Micro_test_serology'
        db.create_table(u'opal_micro_test_serology', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_serology'])

        # Adding model 'Micro_test_csf_pcr'
        db.create_table(u'opal_micro_test_csf_pcr', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_csf_pcr'])

        # Adding model 'Line_removal_reason'
        db.create_table(u'opal_line_removal_reason', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Line_removal_reason'])

        # Adding model 'Micro_test_ebv_serology'
        db.create_table(u'opal_micro_test_ebv_serology', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_ebv_serology'])

        # Adding model 'Line_complication'
        db.create_table(u'opal_line_complication', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Line_complication'])

        # Adding model 'Micro_test_stool_pcr'
        db.create_table(u'opal_micro_test_stool_pcr', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_stool_pcr'])

        # Adding model 'Micro_test_parasitaemia'
        db.create_table(u'opal_micro_test_parasitaemia', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_parasitaemia'])

        # Adding model 'Line_site'
        db.create_table(u'opal_line_site', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Line_site'])

        # Adding model 'Micro_test_single_test_pos_neg'
        db.create_table(u'opal_micro_test_single_test_pos_neg', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_single_test_pos_neg'])

        # Adding model 'Micro_test_mcs'
        db.create_table(u'opal_micro_test_mcs', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_mcs'])

        # Adding model 'Antimicrobial'
        db.create_table(u'opal_antimicrobial', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Antimicrobial'])

        # Adding model 'Micro_test_hiv'
        db.create_table(u'opal_micro_test_hiv', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_hiv'])

        # Adding model 'Microbiology_organism'
        db.create_table(u'opal_microbiology_organism', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Microbiology_organism'])

        # Adding model 'Micro_test_syphilis_serology'
        db.create_table(u'opal_micro_test_syphilis_serology', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_syphilis_serology'])

        # Adding model 'Micro_test_leishmaniasis_pcr'
        db.create_table(u'opal_micro_test_leishmaniasis_pcr', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_leishmaniasis_pcr'])

        # Adding model 'Antimicrobial_route'
        db.create_table(u'opal_antimicrobial_route', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Antimicrobial_route'])

        # Adding model 'Micro_test_respiratory_virus_pcr'
        db.create_table(u'opal_micro_test_respiratory_virus_pcr', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_respiratory_virus_pcr'])

        # Adding model 'Line_type'
        db.create_table(u'opal_line_type', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Line_type'])

        # Adding model 'Micro_test_swab_pcr'
        db.create_table(u'opal_micro_test_swab_pcr', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
        ))
        db.send_create_signal(u'opal', ['Micro_test_swab_pcr'])
コード例 #50
0
    def forwards(self, orm):

        # Adding model 'Concept'
        db.create_table('skosxl_concept', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('definition',
             self.gf('django.db.models.fields.TextField')(blank=True)),
            ('changenote',
             self.gf('django.db.models.fields.TextField')(blank=True)),
            ('created', self.gf('django.db.models.fields.DateTimeField')(
                default=datetime.datetime.now, blank=True)),
            ('modified', self.gf('django.db.models.fields.DateTimeField')(
                default=datetime.datetime.now, blank=True)),
            ('author', self.gf('django.db.models.fields.CharField')(
                max_length=250, blank=True)),
        ))
        db.send_create_signal('skosxl', ['Concept'])

        # Adding model 'Term'
        db.create_table('skosxl_term', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('literal',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('slug', self.gf('django.db.models.fields.SlugField')(
                db_index=True, max_length=50, blank=True)),
            ('language', self.gf('django.db.models.fields.CharField')(
                default='@fr', max_length=10)),
            ('created', self.gf('django.db.models.fields.DateTimeField')(
                default=datetime.datetime.now, blank=True)),
            ('modified', self.gf('django.db.models.fields.DateTimeField')(
                default=datetime.datetime.now, blank=True)),
            ('author', self.gf('django.db.models.fields.CharField')(
                max_length=250, blank=True)),
        ))
        db.send_create_signal('skosxl', ['Term'])

        # Adding model 'Vocabulary'
        db.create_table('skosxl_vocabulary', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('info_url', self.gf('django.db.models.fields.URLField')(
                max_length=200, blank=True)),
        ))
        db.send_create_signal('skosxl', ['Vocabulary'])

        # Adding model 'Label'
        db.create_table('skosxl_label', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('term', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['skosxl.Term'])),
            ('concept', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['skosxl.Concept'])),
            ('type',
             self.gf('django.db.models.fields.PositiveSmallIntegerField')(
                 default=0)),
        ))
        db.send_create_signal('skosxl', ['Label'])

        # Adding model 'SemRelation'
        db.create_table('skosxl_semrelation', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('origin_concept',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='origin', to=orm['skosxl.Concept'])),
            ('target_concept',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='target', to=orm['skosxl.Concept'])),
            ('type',
             self.gf('django.db.models.fields.PositiveSmallIntegerField')(
                 default=2)),
        ))
        db.send_create_signal('skosxl', ['SemRelation'])

        # Adding model 'SimilarConcept'
        db.create_table('skosxl_similarconcept', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('similar_to',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['skosxl.Concept'])),
            ('Preflabel',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('uri',
             self.gf('django.db.models.fields.CharField')(max_length=250)),
            ('voc', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['skosxl.Vocabulary'])),
            ('match_type',
             self.gf('django.db.models.fields.PositiveSmallIntegerField')(
                 default=0)),
        ))
        db.send_create_signal('skosxl', ['SimilarConcept'])
コード例 #51
0
    def forwards(self, orm):

        # Adding model 'ConfigClass'
        db.create_table('core_configclass', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=50, db_index=True)),
            ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
        ))
        db.send_create_signal('core', ['ConfigClass'])

        # Adding model 'ConfigClassParameterType'
        db.create_table('core_configclassparametertype', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=50, db_index=True)),
            ('validator_function', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('validator_kwargs', self.gf('django.db.models.fields.CharField')(max_length=200, null=True, blank=True)),
        ))
        db.send_create_signal('core', ['ConfigClassParameterType'])

        # Adding model 'ConfigClassParameter'
        db.create_table('core_configclassparameter', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('config_class', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['core.ConfigClass'])),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=50, db_index=True)),
            ('default_value', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('config_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['core.ConfigClassParameterType'], null=True, blank=True)),
            ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
        ))
        db.send_create_signal('core', ['ConfigClassParameter'])

        # Adding model 'Role'
        db.create_table('core_role', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=200, db_index=True)),
            ('service', self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('internal', self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('core', ['Role'])

        # Adding model 'RoleConfigClassAssignment'
        db.create_table('core_roleconfigclassassignement', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('role', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['core.Role'])),
            ('config_class', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['core.ConfigClass'])),
        ))
        db.send_create_signal('core', ['RoleConfigClassAssignment'])

        # Adding unique constraint on 'RoleConfigClassAssignment', fields ['role', 'config_class']
        db.create_unique('core_roleconfigclassassignement', ['role_id', 'config_class_id'])

        # Adding model 'Host'
        db.create_table('core_host', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('fqdn', self.gf('django.db.models.fields.CharField')(unique=True, max_length=200, db_index=True)),
            ('address', self.gf('django.db.models.fields.IPAddressField')(max_length=15, blank=True)),
            ('type', self.gf('django.db.models.fields.CharField')(max_length=5, blank=True)),
        ))
        db.send_create_signal('core', ['Host'])

        # Adding model 'Group'
        db.create_table('core_group', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=200, db_index=True)),
        ))
        db.send_create_signal('core', ['Group'])

        # Adding model 'Master'
        db.create_table('core_master', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('fqdn', self.gf('django.db.models.fields.CharField')(unique=True, max_length=200, db_index=True)),
            ('promoted_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
            ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('core', ['Master'])

        # Adding model 'Node'
        db.create_table('core_node', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('fqdn', self.gf('django.db.models.fields.CharField')(unique=True, max_length=200, db_index=True)),
            ('joined_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
            ('master', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['core.Master'])),
            ('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['core.Group'], null=True, blank=True)),
            ('facts', self.gf('django.db.models.fields.TextField')(blank=True)),
            ('report', self.gf('django.db.models.fields.TextField')(blank=True)),
            ('facts_list', self.gf('django.db.models.fields.TextField')(blank=True)),
            ('report_log', self.gf('django.db.models.fields.TextField')(blank=True)),
            ('report_date', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
            ('report_last_changed_date', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
            ('report_status', self.gf('django.db.models.fields.CharField')(max_length=1, blank=True)),
            ('host', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['core.Host'], null=True, blank=True)),
        ))
        db.send_create_signal('core', ['Node'])

        # Adding model 'NodeRoleAssignment'
        db.create_table('core_noderoleassignment', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('node', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['core.Node'])),
            ('role', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['core.Role'])),
            ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('last_updated', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
        ))
        db.send_create_signal('core', ['NodeRoleAssignment'])

        # Adding unique constraint on 'NodeRoleAssignment', fields ['role', 'node']
        db.create_unique('core_noderoleassignment', ['role_id', 'node_id'])

        # Adding model 'Override'
        db.create_table('core_override', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('node', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['core.Node'])),
            ('config_class_parameter', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['core.ConfigClassParameter'])),
            ('value', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('one_time_only', self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('core', ['Override'])

        # Adding unique constraint on 'Override', fields ['node', 'config_class_parameter']
        db.create_unique('core_override', ['node_id', 'config_class_parameter_id'])

        # Adding model 'GroupOverride'
        db.create_table('core_groupoverride', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['core.Group'])),
            ('config_class_parameter', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['core.ConfigClassParameter'])),
            ('value', self.gf('django.db.models.fields.CharField')(max_length=200)),
        ))
        db.send_create_signal('core', ['GroupOverride'])

        # Adding unique constraint on 'GroupOverride', fields ['group', 'config_class_parameter']
        db.create_unique('core_groupoverride', ['group_id', 'config_class_parameter_id'])

        # load the date
        load_data(orm, 'migrations_0001_initial')
コード例 #52
0
    def forwards(self, orm):

        # Adding model 'MailHost'
        db.create_table('mail_hosts', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('address',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('enabled',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('port',
             self.gf('django.db.models.fields.IntegerField')(default=25)),
            ('useraddress',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='mh_ua', to=orm['accounts.UserAddresses'])),
        ))
        db.send_create_signal('config', ['MailHost'])

        # Adding model 'MailAuthHost'
        db.create_table('auth_hosts', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('address',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('protocol',
             self.gf('django.db.models.fields.IntegerField')(default=1)),
            ('port',
             self.gf('django.db.models.fields.IntegerField')(blank=True)),
            ('enabled',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('split_address',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('useraddress',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='mah_ua', to=orm['accounts.UserAddresses'])),
        ))
        db.send_create_signal('config', ['MailAuthHost'])

        # Adding model 'ScannerHost'
        db.create_table('scanners', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('address',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
        ))
        db.send_create_signal('config', ['ScannerHost'])

        # Adding model 'ConfigSection'
        db.create_table('scanner_config_sections', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
        ))
        db.send_create_signal('config', ['ConfigSection'])

        # Adding model 'ScannerConfig'
        db.create_table('scanner_config', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('internal',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('external',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('display', self.gf('django.db.models.fields.TextField')()),
            ('help', self.gf('django.db.models.fields.TextField')()),
            ('value', self.gf('django.db.models.fields.TextField')()),
            ('section', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['config.ConfigSection'])),
            ('host', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['config.ScannerHost'])),
        ))
        db.send_create_signal('config', ['ScannerConfig'])
コード例 #53
0
    def forwards(self, orm):

        # Adding model 'ApprovalObjectType'
        db.create_table('approvaltool_approvalobjecttype', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=200)),
            ('type', self.gf('django.db.models.fields.IntegerField')()),
        ))
        db.send_create_signal('approvaltool', ['ApprovalObjectType'])

        # Adding M2M table for field approvalrule on 'ApprovalObjectType'
        db.create_table(
            'approvaltool_approvalobjecttype_approvalrule',
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('approvalobjecttype',
              models.ForeignKey(orm['approvaltool.approvalobjecttype'],
                                null=False)),
             ('approvalrule',
              models.ForeignKey(orm['approvaltool.approvalrule'],
                                null=False))))
        db.create_unique('approvaltool_approvalobjecttype_approvalrule',
                         ['approvalobjecttype_id', 'approvalrule_id'])

        # Adding model 'ApprovalObject'
        db.create_table('approvaltool_approvalobject', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=100)),
        ))
        db.send_create_signal('approvaltool', ['ApprovalObject'])

        # Adding M2M table for field approvalobjecttype on 'ApprovalObject'
        db.create_table(
            'approvaltool_approvalobject_approvalobjecttype',
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('approvalobject',
              models.ForeignKey(orm['approvaltool.approvalobject'],
                                null=False)),
             ('approvalobjecttype',
              models.ForeignKey(orm['approvaltool.approvalobjecttype'],
                                null=False))))
        db.create_unique('approvaltool_approvalobject_approvalobjecttype',
                         ['approvalobject_id', 'approvalobjecttype_id'])

        # Adding model 'ApprovalObjectState'
        db.create_table('approvaltool_approvalobjectstate', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('approvalobject',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['approvaltool.ApprovalObject'])),
            ('approvalrule',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['approvaltool.ApprovalRule'])),
            ('date', self.gf('django.db.models.fields.DateTimeField')(
                auto_now_add=True, blank=True)),
            ('creatorlog',
             self.gf('django.db.models.fields.CharField')(max_length=40)),
            ('successful', self.gf('django.db.models.fields.NullBooleanField')(
                null=True, blank=True)),
            ('remarks',
             self.gf('django.db.models.fields.TextField')(blank=True)),
        ))
        db.send_create_signal('approvaltool', ['ApprovalObjectState'])

        # Adding model 'ApprovalRule'
        db.create_table('approvaltool_approvalrule', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=80)),
            ('description',
             self.gf('django.db.models.fields.TextField')(blank=True)),
            ('position',
             self.gf('django.db.models.fields.IntegerField')(default=0)),
            ('permissionlevel',
             self.gf('django.db.models.fields.IntegerField')(default=1)),
        ))
        db.send_create_signal('approvaltool', ['ApprovalRule'])
コード例 #54
0
ファイル: 0001_initial.py プロジェクト: cocosicq/CryptoBlog
    def forwards(self, orm):
        # Adding model 'FacebookUser'
        db.create_table(u'django_facebook_facebookuser', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user_id', self.gf('django.db.models.fields.IntegerField')()),
            ('facebook_id', self.gf('django.db.models.fields.BigIntegerField')()),
            ('name', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
            ('gender', self.gf('django.db.models.fields.CharField')(max_length=1, null=True, blank=True)),
        ))
        db.send_create_signal(u'django_facebook', ['FacebookUser'])

        # Adding unique constraint on 'FacebookUser', fields ['user_id', 'facebook_id']
        db.create_unique(u'django_facebook_facebookuser', ['user_id', 'facebook_id'])

        # Adding model 'FacebookLike'
        db.create_table(u'django_facebook_facebooklike', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user_id', self.gf('django.db.models.fields.IntegerField')()),
            ('facebook_id', self.gf('django.db.models.fields.BigIntegerField')()),
            ('name', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
            ('category', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
            ('created_time', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
        ))
        db.send_create_signal(u'django_facebook', ['FacebookLike'])

        # Adding unique constraint on 'FacebookLike', fields ['user_id', 'facebook_id']
        db.create_unique(u'django_facebook_facebooklike', ['user_id', 'facebook_id'])

        # Adding model 'FacebookProfile'
        db.create_table(u'django_facebook_facebookprofile', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('about_me', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
            ('facebook_id', self.gf('django.db.models.fields.BigIntegerField')(unique=True, null=True, blank=True)),
            ('access_token', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
            ('facebook_name', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
            ('facebook_profile_url', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
            ('website_url', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
            ('blog_url', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
            ('date_of_birth', self.gf('django.db.models.fields.DateField')(null=True, blank=True)),
            ('gender', self.gf('django.db.models.fields.CharField')(max_length=1, null=True, blank=True)),
            ('raw_data', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
            ('facebook_open_graph', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)),
            ('new_token_required', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('image', self.gf('django.db.models.fields.files.ImageField')(max_length=255, null=True, blank=True)),
            ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm[user_orm_label], unique=True)),
        ))
        db.send_create_signal(u'django_facebook', ['FacebookProfile'])

        if getattr(settings, 'AUTH_USER_MODEL', None) == 'django_facebook.FacebookCustomUser':
            # Adding model 'FacebookCustomUser'
            db.create_table(u'django_facebook_facebookcustomuser', (
                (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)),
                ('is_superuser', self.gf('django.db.models.fields.BooleanField')(default=False)),
                ('username', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)),
                ('first_name', self.gf('django.db.models.fields.CharField')(max_length=30, blank=True)),
                ('last_name', self.gf('django.db.models.fields.CharField')(max_length=30, blank=True)),
                ('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)),
                ('about_me', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
                ('facebook_id', self.gf('django.db.models.fields.BigIntegerField')(unique=True, null=True, blank=True)),
                ('access_token', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
                ('facebook_name', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
                ('facebook_profile_url', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
                ('website_url', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
                ('blog_url', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
                ('date_of_birth', self.gf('django.db.models.fields.DateField')(null=True, blank=True)),
                ('gender', self.gf('django.db.models.fields.CharField')(max_length=1, null=True, blank=True)),
                ('raw_data', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
                ('facebook_open_graph', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)),
                ('new_token_required', self.gf('django.db.models.fields.BooleanField')(default=False)),
                ('image', self.gf('django.db.models.fields.files.ImageField')(max_length=255, null=True, blank=True)),
                ('state', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
            ))
            db.send_create_signal(u'django_facebook', ['FacebookCustomUser'])

            # Adding M2M table for field groups on 'FacebookCustomUser'
            m2m_table_name = db.shorten_name(u'django_facebook_facebookcustomuser_groups')
            db.create_table(m2m_table_name, (
                ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
                ('facebookcustomuser', models.ForeignKey(orm[u'django_facebook.facebookcustomuser'], null=False)),
                ('group', models.ForeignKey(orm[u'auth.group'], null=False))
            ))
            db.create_unique(m2m_table_name, ['facebookcustomuser_id', 'group_id'])

            # Adding M2M table for field user_permissions on 'FacebookCustomUser'
            m2m_table_name = db.shorten_name(u'django_facebook_facebookcustomuser_user_permissions')
            db.create_table(m2m_table_name, (
                ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
                ('facebookcustomuser', models.ForeignKey(orm[u'django_facebook.facebookcustomuser'], null=False)),
                ('permission', models.ForeignKey(orm[u'auth.permission'], null=False))
            ))
            db.create_unique(m2m_table_name, ['facebookcustomuser_id', 'permission_id'])

        # Adding model 'OpenGraphShare'
        db.create_table('django_facebook_open_graph_share', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm[user_orm_label])),
            ('action_domain', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('facebook_user_id', self.gf('django.db.models.fields.BigIntegerField')()),
            ('share_dict', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
            ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'], null=True, blank=True)),
            ('object_id', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
            ('error_message', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
            ('last_attempt', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True, blank=True)),
            ('retry_count', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
            ('share_id', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
            ('completed_at', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
            ('removed_at', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
            ('updated_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
            ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)),
        ))
        db.send_create_signal(u'django_facebook', ['OpenGraphShare'])
コード例 #55
0
ファイル: 0001_initial.py プロジェクト: tonyduncan/ToMaTo
    def forwards(self, orm):

        # Adding model 'User'
        db.create_table('tomato_user', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('origin',
             self.gf('django.db.models.fields.CharField')(max_length=50)),
            ('attrs', self.gf('tomato.lib.db.JSONField')()),
            ('password', self.gf('django.db.models.fields.CharField')(
                max_length=250, null=True)),
            ('password_time',
             self.gf('django.db.models.fields.DateTimeField')(null=True)),
        ))
        db.send_create_signal('tomato', ['User'])

        # Adding unique constraint on 'User', fields ['name', 'origin']
        db.create_unique('tomato_user', ['name', 'origin'])

        # Adding model 'Permissions'
        db.create_table('tomato_permissions',
                        (('id', self.gf('django.db.models.fields.AutoField')(
                            primary_key=True)), ))
        db.send_create_signal('tomato', ['Permissions'])

        # Adding model 'PermissionEntry'
        db.create_table('tomato_permissionentry', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('set', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='entries', to=orm['tomato.Permissions'])),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.User'])),
            ('role',
             self.gf('django.db.models.fields.CharField')(max_length=20)),
        ))
        db.send_create_signal('tomato', ['PermissionEntry'])

        # Adding unique constraint on 'PermissionEntry', fields ['user', 'set']
        db.create_unique('tomato_permissionentry', ['user_id', 'set_id'])

        # Adding model 'UsageStatistics'
        db.create_table('tomato_usagestatistics', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('attrs', self.gf('tomato.lib.db.JSONField')()),
        ))
        db.send_create_signal('tomato', ['UsageStatistics'])

        # Adding model 'UsageRecord'
        db.create_table('tomato_usagerecord', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('statistics',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='records', to=orm['tomato.UsageStatistics'])),
            ('type', self.gf('django.db.models.fields.CharField')(
                max_length=10, db_index=True)),
            ('begin', self.gf('django.db.models.fields.FloatField')()),
            ('end',
             self.gf('django.db.models.fields.FloatField')(db_index=True)),
            ('measurements',
             self.gf('django.db.models.fields.IntegerField')()),
            ('memory', self.gf('django.db.models.fields.FloatField')()),
            ('diskspace', self.gf('django.db.models.fields.FloatField')()),
            ('traffic', self.gf('django.db.models.fields.FloatField')()),
            ('cputime', self.gf('django.db.models.fields.FloatField')()),
        ))
        db.send_create_signal('tomato', ['UsageRecord'])

        # Adding unique constraint on 'UsageRecord', fields ['statistics', 'type', 'end']
        db.create_unique('tomato_usagerecord',
                         ['statistics_id', 'type', 'end'])

        # Adding model 'Topology'
        db.create_table('tomato_topology', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('permissions',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['tomato.Permissions'])),
            ('totalUsage',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 related_name='+',
                 unique=True,
                 null=True,
                 to=orm['tomato.UsageStatistics'])),
            ('attrs', self.gf('tomato.lib.db.JSONField')()),
        ))
        db.send_create_signal('tomato', ['Topology'])

        # Adding model 'Site'
        db.create_table('tomato_site', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=10)),
            ('description',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
        ))
        db.send_create_signal('tomato', ['Site'])

        # Adding model 'Host'
        db.create_table('tomato_host', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('address', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=255)),
            ('site', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='hosts', to=orm['tomato.Site'])),
            ('attrs', self.gf('tomato.lib.db.JSONField')()),
        ))
        db.send_create_signal('tomato', ['Host'])

        # Adding model 'HostElement'
        db.create_table('tomato_hostelement', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('host', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='elements', to=orm['tomato.Host'])),
            ('num', self.gf('django.db.models.fields.IntegerField')()),
            ('usageStatistics',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 related_name='+',
                 unique=True,
                 null=True,
                 to=orm['tomato.UsageStatistics'])),
            ('attrs', self.gf('tomato.lib.db.JSONField')()),
        ))
        db.send_create_signal('tomato', ['HostElement'])

        # Adding unique constraint on 'HostElement', fields ['host', 'num']
        db.create_unique('tomato_hostelement', ['host_id', 'num'])

        # Adding model 'HostConnection'
        db.create_table('tomato_hostconnection', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('host', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='connections', to=orm['tomato.Host'])),
            ('num', self.gf('django.db.models.fields.IntegerField')()),
            ('usageStatistics',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 related_name='+',
                 unique=True,
                 null=True,
                 to=orm['tomato.UsageStatistics'])),
            ('attrs', self.gf('tomato.lib.db.JSONField')()),
        ))
        db.send_create_signal('tomato', ['HostConnection'])

        # Adding unique constraint on 'HostConnection', fields ['host', 'num']
        db.create_unique('tomato_hostconnection', ['host_id', 'num'])

        # Adding model 'Connection'
        db.create_table('tomato_connection', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('topology', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='connections', to=orm['tomato.Topology'])),
            ('state',
             self.gf('django.db.models.fields.CharField')(max_length=20)),
            ('permissions',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['tomato.Permissions'])),
            ('totalUsage',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 related_name='+',
                 unique=True,
                 null=True,
                 to=orm['tomato.UsageStatistics'])),
            ('attrs', self.gf('tomato.lib.db.JSONField')()),
            ('connection1',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='+', null=True,
                 to=orm['tomato.HostConnection'])),
            ('connection2',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='+', null=True,
                 to=orm['tomato.HostConnection'])),
            ('connectionElement1',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='+', null=True, to=orm['tomato.HostElement'])),
            ('connectionElement2',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='+', null=True, to=orm['tomato.HostElement'])),
        ))
        db.send_create_signal('tomato', ['Connection'])

        # Adding model 'Element'
        db.create_table('tomato_element', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('topology', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='elements', to=orm['tomato.Topology'])),
            ('type',
             self.gf('django.db.models.fields.CharField')(max_length=30)),
            ('state',
             self.gf('django.db.models.fields.CharField')(max_length=20)),
            ('parent', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='children', null=True, to=orm['tomato.Element'])),
            ('connection',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 related_name='elements',
                 null=True,
                 to=orm['tomato.Connection'])),
            ('permissions',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['tomato.Permissions'])),
            ('totalUsage',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 related_name='+',
                 unique=True,
                 null=True,
                 to=orm['tomato.UsageStatistics'])),
            ('attrs', self.gf('tomato.lib.db.JSONField')()),
        ))
        db.send_create_signal('tomato', ['Element'])

        # Adding model 'Resource'
        db.create_table('tomato_resource', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('type',
             self.gf('django.db.models.fields.CharField')(max_length=20)),
            ('attrs', self.gf('tomato.lib.db.JSONField')()),
        ))
        db.send_create_signal('tomato', ['Resource'])

        # Adding model 'ResourceInstance'
        db.create_table('tomato_resourceinstance', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('type',
             self.gf('django.db.models.fields.CharField')(max_length=20)),
            ('num', self.gf('django.db.models.fields.IntegerField')()),
            ('ownerElement',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['tomato.Element'], null=True)),
            ('ownerConnection',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['tomato.Connection'], null=True)),
            ('attrs', self.gf('tomato.lib.db.JSONField')()),
        ))
        db.send_create_signal('tomato', ['ResourceInstance'])

        # Adding unique constraint on 'ResourceInstance', fields ['num', 'type']
        db.create_unique('tomato_resourceinstance', ['num', 'type'])

        # Adding model 'OpenVZ'
        db.create_table('tomato_openvz', (
            ('element_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['tomato.Element'], unique=True, primary_key=True)),
            ('element', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.HostElement'], null=True)),
            ('site', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.Site'], null=True)),
            ('template', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.Resource'], null=True)),
        ))
        db.send_create_signal('tomato', ['OpenVZ'])

        # Adding model 'OpenVZ_Interface'
        db.create_table('tomato_openvz_interface', (
            ('element_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['tomato.Element'], unique=True, primary_key=True)),
            ('element', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.HostElement'], null=True)),
        ))
        db.send_create_signal('tomato', ['OpenVZ_Interface'])

        # Adding model 'KVMQM'
        db.create_table('tomato_kvmqm', (
            ('element_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['tomato.Element'], unique=True, primary_key=True)),
            ('element', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.HostElement'], null=True)),
            ('site', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.Site'], null=True)),
            ('template', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.Resource'], null=True)),
        ))
        db.send_create_signal('tomato', ['KVMQM'])

        # Adding model 'KVMQM_Interface'
        db.create_table('tomato_kvmqm_interface', (
            ('element_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['tomato.Element'], unique=True, primary_key=True)),
            ('element', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.HostElement'], null=True)),
        ))
        db.send_create_signal('tomato', ['KVMQM_Interface'])

        # Adding model 'Repy'
        db.create_table('tomato_repy', (
            ('element_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['tomato.Element'], unique=True, primary_key=True)),
            ('element', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.HostElement'], null=True)),
            ('site', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.Site'], null=True)),
            ('template', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.Resource'], null=True)),
        ))
        db.send_create_signal('tomato', ['Repy'])

        # Adding model 'Repy_Interface'
        db.create_table('tomato_repy_interface', (
            ('element_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['tomato.Element'], unique=True, primary_key=True)),
            ('element', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.HostElement'], null=True)),
        ))
        db.send_create_signal('tomato', ['Repy_Interface'])

        # Adding model 'Tinc_VPN'
        db.create_table(
            'tomato_tinc_vpn',
            (('element_ptr',
              self.gf('django.db.models.fields.related.OneToOneField')(
                  to=orm['tomato.Element'], unique=True, primary_key=True)), ))
        db.send_create_signal('tomato', ['Tinc_VPN'])

        # Adding model 'Tinc_Endpoint'
        db.create_table('tomato_tinc_endpoint', (
            ('element_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['tomato.Element'], unique=True, primary_key=True)),
            ('element', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.HostElement'], null=True)),
        ))
        db.send_create_signal('tomato', ['Tinc_Endpoint'])

        # Adding model 'Network'
        db.create_table('tomato_network', (
            ('resource_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['tomato.Resource'], unique=True, primary_key=True)),
            ('kind', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=50)),
            ('preference',
             self.gf('django.db.models.fields.IntegerField')(default=0)),
        ))
        db.send_create_signal('tomato', ['Network'])

        # Adding model 'NetworkInstance'
        db.create_table('tomato_network_instance', (
            ('resource_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['tomato.Resource'], unique=True, primary_key=True)),
            ('network', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='instances', to=orm['tomato.Network'])),
            ('host', self.gf('django.db.models.fields.related.ForeignKey')(
                related_name='networks', to=orm['tomato.Host'])),
            ('bridge',
             self.gf('django.db.models.fields.CharField')(max_length=20)),
        ))
        db.send_create_signal('tomato', ['NetworkInstance'])

        # Adding unique constraint on 'NetworkInstance', fields ['host', 'bridge']
        db.create_unique('tomato_network_instance', ['host_id', 'bridge'])

        # Adding model 'External_Network'
        db.create_table('external_network', (
            ('element_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['tomato.Element'], unique=True, primary_key=True)),
            ('network', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.Network'], null=True)),
        ))
        db.send_create_signal('tomato', ['External_Network'])

        # Adding model 'External_Network_Endpoint'
        db.create_table('tomato_external_network_endpoint', (
            ('element_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['tomato.Element'], unique=True, primary_key=True)),
            ('element', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.HostElement'], null=True)),
            ('network', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.NetworkInstance'], null=True)),
        ))
        db.send_create_signal('tomato', ['External_Network_Endpoint'])

        # Adding model 'UDP_Endpoint'
        db.create_table('tomato_udp_endpoint', (
            ('element_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['tomato.Element'], unique=True, primary_key=True)),
            ('element', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['tomato.HostElement'], null=True)),
        ))
        db.send_create_signal('tomato', ['UDP_Endpoint'])

        # Adding model 'Template'
        db.create_table('tomato_template', (
            ('resource_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(
                 to=orm['tomato.Resource'], unique=True, primary_key=True)),
            ('tech',
             self.gf('django.db.models.fields.CharField')(max_length=20)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=50)),
            ('preference',
             self.gf('django.db.models.fields.IntegerField')(default=0)),
        ))
        db.send_create_signal('tomato', ['Template'])
コード例 #56
0
ファイル: 0001_initial.py プロジェクト: xiaoyongzi/froide
    def forwards(self, orm):

        # Adding model 'FoiRequest'
        db.create_table('foirequest_foirequest', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('title',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('slug', self.gf('django.db.models.fields.SlugField')(
                unique=True, max_length=255, db_index=True)),
            ('resolution', self.gf('django.db.models.fields.TextField')(
                null=True, blank=True)),
            ('public_body',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['publicbody.PublicBody'], null=True, blank=True)),
            ('public',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('status',
             self.gf('django.db.models.fields.CharField')(max_length=25)),
            ('visibility',
             self.gf('django.db.models.fields.SmallIntegerField')(default=0)),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['auth.User'], null=True)),
            ('first_message', self.gf('django.db.models.fields.DateTimeField')(
                null=True, blank=True)),
            ('last_message', self.gf('django.db.models.fields.DateTimeField')(
                null=True, blank=True)),
            ('resolved_on', self.gf('django.db.models.fields.DateTimeField')(
                null=True, blank=True)),
            ('due_date', self.gf('django.db.models.fields.DateTimeField')(
                null=True, blank=True)),
            ('secret_address', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=255, db_index=True)),
            ('secret', self.gf('django.db.models.fields.CharField')(
                max_length=100, blank=True)),
            ('law', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['publicbody.FoiLaw'], null=True, blank=True)),
            ('costs',
             self.gf('django.db.models.fields.FloatField')(default=0.0)),
            ('refusal_reason', self.gf('django.db.models.fields.CharField')(
                max_length=255, blank=True)),
            ('site', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['sites.Site'], null=True)),
        ))
        db.send_create_signal('foirequest', ['FoiRequest'])

        # Adding model 'PublicBodySuggestion'
        db.create_table('foirequest_publicbodysuggestion', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('request', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['foirequest.FoiRequest'])),
            ('public_body',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['publicbody.PublicBody'])),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['auth.User'], null=True)),
            ('timestamp', self.gf('django.db.models.fields.DateTimeField')(
                auto_now_add=True, blank=True)),
        ))
        db.send_create_signal('foirequest', ['PublicBodySuggestion'])

        # Adding model 'FoiMessage'
        db.create_table('foirequest_foimessage', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('request', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['foirequest.FoiRequest'])),
            ('sent',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('is_response',
             self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('sender_user',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['auth.User'], null=True, blank=True)),
            ('sender_email', self.gf('django.db.models.fields.CharField')(
                max_length=255, blank=True)),
            ('sender_name', self.gf('django.db.models.fields.CharField')(
                max_length=255, blank=True)),
            ('sender_public_body',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['publicbody.PublicBody'], null=True, blank=True)),
            ('recipient', self.gf('django.db.models.fields.CharField')(
                max_length=255, blank=True)),
            ('timestamp',
             self.gf('django.db.models.fields.DateTimeField')(blank=True)),
            ('subject', self.gf('django.db.models.fields.CharField')(
                max_length=255, blank=True)),
            ('plaintext', self.gf('django.db.models.fields.TextField')(
                null=True, blank=True)),
            ('html', self.gf('django.db.models.fields.TextField')(null=True,
                                                                  blank=True)),
            ('original',
             self.gf('django.db.models.fields.TextField')(blank=True)),
            ('redacted',
             self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('_status', self.gf('django.db.models.fields.SmallIntegerField')(
                default=None, null=True, blank=True)),
            ('_resolution',
             self.gf('django.db.models.fields.SmallIntegerField')(
                 default=None, null=True, blank=True)),
            ('_visibility',
             self.gf('django.db.models.fields.SmallIntegerField')(default=1)),
        ))
        db.send_create_signal('foirequest', ['FoiMessage'])

        # Adding model 'FoiAttachment'
        db.create_table('foirequest_foiattachment', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('belongs_to',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['foirequest.FoiMessage'], null=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('file', self.gf('django.db.models.fields.files.FileField')(
                max_length=100)),
            ('size', self.gf('django.db.models.fields.IntegerField')(
                null=True, blank=True)),
            ('filetype', self.gf('django.db.models.fields.CharField')(
                max_length=100, blank=True)),
            ('format', self.gf('django.db.models.fields.CharField')(
                max_length=100, blank=True)),
        ))
        db.send_create_signal('foirequest', ['FoiAttachment'])

        # Adding model 'FoiEvent'
        db.create_table('foirequest_foievent', (
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('request', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['foirequest.FoiRequest'])),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['auth.User'], null=True, blank=True)),
            ('public_body',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['publicbody.PublicBody'], null=True, blank=True)),
            ('event_name',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('timestamp', self.gf('django.db.models.fields.DateTimeField')(
                auto_now_add=True, blank=True)),
            ('context_json', self.gf('django.db.models.fields.TextField')()),
        ))
        db.send_create_signal('foirequest', ['FoiEvent'])
コード例 #57
0
    def forwards(self, orm):
        # Adding model 'Supplier'
        db.create_table(u'stockmgmt_supplier', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=128)),
        ))
        db.send_create_signal(u'stockmgmt', ['Supplier'])

        # Adding model 'ProductType'
        db.create_table(u'stockmgmt_producttype', (
            ('shortcode', self.gf('django.db.models.fields.CharField')(max_length=16, primary_key=True)),
            ('description', self.gf('django.db.models.fields.CharField')(max_length=64, blank=True)),
        ))
        db.send_create_signal(u'stockmgmt', ['ProductType'])

        # Adding model 'Product'
        db.create_table(u'stockmgmt_product', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('product_type', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['stockmgmt.ProductType'], null=True, blank=True)),
            ('article_family', self.gf('django.db.models.fields.CharField')(max_length=64, blank=True)),
            ('supplier', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['stockmgmt.Supplier'], null=True, blank=True)),
            ('public_price', self.gf('django.db.models.fields.DecimalField')(default=None, null=True, max_digits=6, decimal_places=2, blank=True)),
            ('length', self.gf('django.db.models.fields.IntegerField')(default=None, null=True, blank=True)),
            ('width', self.gf('django.db.models.fields.IntegerField')(default=None, null=True, blank=True)),
            ('height', self.gf('django.db.models.fields.IntegerField')(default=None, null=True, blank=True)),
            ('weight', self.gf('django.db.models.fields.IntegerField')(default=None, null=True, blank=True)),
            ('ean', self.gf('django.db.models.fields.CharField')(max_length=64, blank=True)),
        ))
        db.send_create_signal(u'stockmgmt', ['Product'])

        # Adding model 'Package'
        db.create_table(u'stockmgmt_package', (
            (u'product_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['stockmgmt.Product'], unique=True, primary_key=True)),
        ))
        db.send_create_signal(u'stockmgmt', ['Package'])

        # Adding M2M table for field products on 'Package'
        db.create_table(u'stockmgmt_package_products', (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('package', models.ForeignKey(orm[u'stockmgmt.package'], null=False)),
            ('product', models.ForeignKey(orm[u'stockmgmt.product'], null=False))
        ))
        db.create_unique(u'stockmgmt_package_products', ['package_id', 'product_id'])

        # Adding model 'StockMvt'
        db.create_table(u'stockmgmt_stockmvt', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
            ('product', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['stockmgmt.Product'])),
            ('quantity', self.gf('django.db.models.fields.IntegerField')()),
            ('reason', self.gf('django.db.models.fields.CharField')(max_length=255)),
        ))
        db.send_create_signal(u'stockmgmt', ['StockMvt'])
コード例 #58
0
    def forwards(self, orm):
        # Adding model 'UserProfile'
        db.create_table(u'main_userprofile', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('uid', self.gf('django.db.models.fields.CharField')(default='ecf4eeb4', unique=True, max_length=8)),
            ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)),
        ))
        db.send_create_signal(u'main', ['UserProfile'])

        # Adding model 'Dataset'
        db.create_table(u'main_dataset', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('uid', self.gf('django.db.models.fields.CharField')(default='6b0704f0', unique=True, max_length=8)),
            ('type', self.gf('django.db.models.fields.CharField')(max_length=40)),
            ('label', self.gf('django.db.models.fields.CharField')(max_length=256)),
            ('filesystem_location', self.gf('django.db.models.fields.CharField')(max_length=512, blank=True)),
            ('filesystem_idx_location', self.gf('django.db.models.fields.CharField')(max_length=512, blank=True)),
            ('status', self.gf('django.db.models.fields.CharField')(default='READY', max_length=40)),
        ))
        db.send_create_signal(u'main', ['Dataset'])

        # Adding model 'Project'
        db.create_table(u'main_project', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('uid', self.gf('django.db.models.fields.CharField')(default='e5bb40ee', unique=True, max_length=8)),
            ('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.UserProfile'])),
            ('title', self.gf('django.db.models.fields.CharField')(max_length=256)),
            ('s3_backed', self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal(u'main', ['Project'])

        # Adding model 'Chromosome'
        db.create_table(u'main_chromosome', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('uid', self.gf('django.db.models.fields.CharField')(default='b34f7c93', unique=True, max_length=8)),
            ('reference_genome', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.ReferenceGenome'])),
            ('label', self.gf('django.db.models.fields.CharField')(max_length=256)),
            ('num_bases', self.gf('django.db.models.fields.BigIntegerField')()),
        ))
        db.send_create_signal(u'main', ['Chromosome'])

        # Adding model 'ReferenceGenome'
        db.create_table(u'main_referencegenome', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('uid', self.gf('django.db.models.fields.CharField')(default='d1469408', unique=True, max_length=8)),
            ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.Project'])),
            ('label', self.gf('django.db.models.fields.CharField')(max_length=256)),
            ('variant_key_map', self.gf('main.custom_fields.PostgresJsonField')()),
            ('is_materialized_variant_view_valid', self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal(u'main', ['ReferenceGenome'])

        # Adding M2M table for field dataset_set on 'ReferenceGenome'
        m2m_table_name = db.shorten_name(u'main_referencegenome_dataset_set')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('referencegenome', models.ForeignKey(orm[u'main.referencegenome'], null=False)),
            ('dataset', models.ForeignKey(orm[u'main.dataset'], null=False))
        ))
        db.create_unique(m2m_table_name, ['referencegenome_id', 'dataset_id'])

        # Adding model 'ExperimentSample'
        db.create_table(u'main_experimentsample', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('uid', self.gf('django.db.models.fields.CharField')(default='b8f40901', unique=True, max_length=8)),
            ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.Project'])),
            ('label', self.gf('django.db.models.fields.CharField')(max_length=256)),
            ('data', self.gf('main.custom_fields.PostgresJsonField')()),
        ))
        db.send_create_signal(u'main', ['ExperimentSample'])

        # Adding M2M table for field dataset_set on 'ExperimentSample'
        m2m_table_name = db.shorten_name(u'main_experimentsample_dataset_set')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('experimentsample', models.ForeignKey(orm[u'main.experimentsample'], null=False)),
            ('dataset', models.ForeignKey(orm[u'main.dataset'], null=False))
        ))
        db.create_unique(m2m_table_name, ['experimentsample_id', 'dataset_id'])

        # Adding model 'AlignmentGroup'
        db.create_table(u'main_alignmentgroup', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('uid', self.gf('django.db.models.fields.CharField')(default='d9efcad4', unique=True, max_length=8)),
            ('label', self.gf('django.db.models.fields.CharField')(max_length=256, blank=True)),
            ('reference_genome', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.ReferenceGenome'])),
            ('aligner', self.gf('django.db.models.fields.CharField')(max_length=10)),
            ('start_time', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
            ('end_time', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
            ('status', self.gf('django.db.models.fields.CharField')(default='NOT_STARTED', max_length=40)),
        ))
        db.send_create_signal(u'main', ['AlignmentGroup'])

        # Adding M2M table for field dataset_set on 'AlignmentGroup'
        m2m_table_name = db.shorten_name(u'main_alignmentgroup_dataset_set')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('alignmentgroup', models.ForeignKey(orm[u'main.alignmentgroup'], null=False)),
            ('dataset', models.ForeignKey(orm[u'main.dataset'], null=False))
        ))
        db.create_unique(m2m_table_name, ['alignmentgroup_id', 'dataset_id'])

        # Adding model 'ExperimentSampleToAlignment'
        db.create_table(u'main_experimentsampletoalignment', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('uid', self.gf('django.db.models.fields.CharField')(default='4e021096', unique=True, max_length=8)),
            ('alignment_group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.AlignmentGroup'])),
            ('experiment_sample', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.ExperimentSample'])),
        ))
        db.send_create_signal(u'main', ['ExperimentSampleToAlignment'])

        # Adding M2M table for field dataset_set on 'ExperimentSampleToAlignment'
        m2m_table_name = db.shorten_name(u'main_experimentsampletoalignment_dataset_set')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('experimentsampletoalignment', models.ForeignKey(orm[u'main.experimentsampletoalignment'], null=False)),
            ('dataset', models.ForeignKey(orm[u'main.dataset'], null=False))
        ))
        db.create_unique(m2m_table_name, ['experimentsampletoalignment_id', 'dataset_id'])

        # Adding model 'Variant'
        db.create_table(u'main_variant', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('uid', self.gf('django.db.models.fields.CharField')(default='2d7d8c65', unique=True, max_length=8)),
            ('type', self.gf('django.db.models.fields.CharField')(max_length=40)),
            ('reference_genome', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.ReferenceGenome'])),
            ('chromosome', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.Chromosome'])),
            ('position', self.gf('django.db.models.fields.BigIntegerField')()),
            ('ref_value', self.gf('django.db.models.fields.TextField')()),
        ))
        db.send_create_signal(u'main', ['Variant'])

        # Adding model 'VariantCallerCommonData'
        db.create_table(u'main_variantcallercommondata', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('variant', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.Variant'])),
            ('source_dataset', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.Dataset'])),
            ('data', self.gf('main.custom_fields.PostgresJsonField')()),
            ('alignment_group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.AlignmentGroup'])),
        ))
        db.send_create_signal(u'main', ['VariantCallerCommonData'])

        # Adding model 'VariantAlternate'
        db.create_table(u'main_variantalternate', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('uid', self.gf('django.db.models.fields.CharField')(default='43363c41', unique=True, max_length=8)),
            ('variant', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.Variant'], null=True)),
            ('alt_value', self.gf('django.db.models.fields.TextField')()),
            ('is_primary', self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('data', self.gf('main.custom_fields.PostgresJsonField')()),
        ))
        db.send_create_signal(u'main', ['VariantAlternate'])

        # Adding model 'VariantEvidence'
        db.create_table(u'main_variantevidence', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('uid', self.gf('django.db.models.fields.CharField')(default='c511c486', unique=True, max_length=8)),
            ('experiment_sample', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.ExperimentSample'])),
            ('variant_caller_common_data', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.VariantCallerCommonData'])),
            ('data', self.gf('main.custom_fields.PostgresJsonField')()),
        ))
        db.send_create_signal(u'main', ['VariantEvidence'])

        # Adding M2M table for field variantalternate_set on 'VariantEvidence'
        m2m_table_name = db.shorten_name(u'main_variantevidence_variantalternate_set')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('variantevidence', models.ForeignKey(orm[u'main.variantevidence'], null=False)),
            ('variantalternate', models.ForeignKey(orm[u'main.variantalternate'], null=False))
        ))
        db.create_unique(m2m_table_name, ['variantevidence_id', 'variantalternate_id'])

        # Adding model 'VariantToVariantSet'
        db.create_table(u'main_varianttovariantset', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('variant', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.Variant'])),
            ('variant_set', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.VariantSet'])),
        ))
        db.send_create_signal(u'main', ['VariantToVariantSet'])

        # Adding M2M table for field sample_variant_set_association on 'VariantToVariantSet'
        m2m_table_name = db.shorten_name(u'main_varianttovariantset_sample_variant_set_association')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('varianttovariantset', models.ForeignKey(orm[u'main.varianttovariantset'], null=False)),
            ('experimentsample', models.ForeignKey(orm[u'main.experimentsample'], null=False))
        ))
        db.create_unique(m2m_table_name, ['varianttovariantset_id', 'experimentsample_id'])

        # Adding model 'VariantSet'
        db.create_table(u'main_variantset', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('uid', self.gf('django.db.models.fields.CharField')(default='4d8415ac', unique=True, max_length=8)),
            ('label', self.gf('django.db.models.fields.CharField')(max_length=256)),
            ('reference_genome', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.ReferenceGenome'])),
        ))
        db.send_create_signal(u'main', ['VariantSet'])

        # Adding M2M table for field dataset_set on 'VariantSet'
        m2m_table_name = db.shorten_name(u'main_variantset_dataset_set')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('variantset', models.ForeignKey(orm[u'main.variantset'], null=False)),
            ('dataset', models.ForeignKey(orm[u'main.dataset'], null=False))
        ))
        db.create_unique(m2m_table_name, ['variantset_id', 'dataset_id'])

        # Adding model 'Region'
        db.create_table(u'main_region', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('uid', self.gf('django.db.models.fields.CharField')(default='14e51a55', unique=True, max_length=8)),
            ('reference_genome', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.ReferenceGenome'])),
            ('label', self.gf('django.db.models.fields.CharField')(max_length=256)),
            ('type', self.gf('django.db.models.fields.CharField')(max_length=40)),
        ))
        db.send_create_signal(u'main', ['Region'])

        # Adding model 'RegionInterval'
        db.create_table(u'main_regioninterval', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('region', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.Region'])),
            ('start', self.gf('django.db.models.fields.BigIntegerField')()),
            ('end', self.gf('django.db.models.fields.BigIntegerField')()),
        ))
        db.send_create_signal(u'main', ['RegionInterval'])

        # Adding model 'S3File'
        db.create_table(u'main_s3file', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('bucket', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('key', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=200, null=True)),
            ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
        ))
        db.send_create_signal(u'main', ['S3File'])
コード例 #59
0
ファイル: 0001_initial.py プロジェクト: caa84/harvest-openmrs
    def forwards(self, orm):
        # Adding model 'Patient'
        db.create_table('patient', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('gender', self.gf('django.db.models.fields.CharField')(
                max_length=50, null=True, blank=True)),
            ('birthdate', self.gf('django.db.models.fields.DateField')(
                null=True, blank=True)),
            ('birthdate_estimated',
             self.gf('django.db.models.fields.NullBooleanField')(null=True,
                                                                 blank=True)),
        ))
        db.send_create_signal(u'openmrs', ['Patient'])

        # Adding model 'Referral'
        db.create_table('referral', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name',
             self.gf('django.db.models.fields.CharField')(max_length=200)),
        ))
        db.send_create_signal(u'openmrs', ['Referral'])

        # Adding model 'Encounter'
        db.create_table('encounter', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('patient', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['openmrs.Patient'])),
            ('encounter_datetime',
             self.gf('django.db.models.fields.DateTimeField')(null=True,
                                                              blank=True)),
            ('description',
             self.gf('django.db.models.fields.TextField')(blank=True)),
        ))
        db.send_create_signal(u'openmrs', ['Encounter'])

        # Adding M2M table for field drugs on 'Encounter'
        m2m_table_name = 'encounter_drug'
        db.create_table(
            m2m_table_name,
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('encounter',
              models.ForeignKey(orm[u'openmrs.encounter'], null=False)),
             ('drug', models.ForeignKey(orm[u'drugs.drug'], null=False))))
        db.create_unique(m2m_table_name, ['encounter_id', 'drug_id'])

        # Adding M2M table for field diagnoses on 'Encounter'
        m2m_table_name = 'encounter_diagnosis'
        db.create_table(
            m2m_table_name,
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('encounter',
              models.ForeignKey(orm[u'openmrs.encounter'], null=False)),
             ('diagnosis',
              models.ForeignKey(orm[u'diagnoses.diagnosis'], null=False))))
        db.create_unique(m2m_table_name, ['encounter_id', 'diagnosis_id'])

        # Adding M2M table for field referrals on 'Encounter'
        m2m_table_name = 'encounter_referral'
        db.create_table(
            m2m_table_name,
            (('id',
              models.AutoField(
                  verbose_name='ID', primary_key=True, auto_created=True)),
             ('encounter',
              models.ForeignKey(orm[u'openmrs.encounter'], null=False)),
             ('referral',
              models.ForeignKey(orm[u'openmrs.referral'], null=False))))
        db.create_unique(m2m_table_name, ['encounter_id', 'referral_id'])

        # Adding model 'EncounterVaccine'
        db.create_table('encounter_vaccine', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('encounter',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['openmrs.Encounter'])),
            ('vaccine', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['vaccines.Vaccine'])),
            ('status', self.gf('django.db.models.fields.CharField')(
                max_length=100, null=True)),
        ))
        db.send_create_signal(u'openmrs', ['EncounterVaccine'])

        # Adding model 'LabResult'
        db.create_table('lab_result', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('encounter',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['openmrs.Encounter'])),
            ('hgb', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('wbc', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('rbc', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('platelets',
             self.gf('django.db.models.fields.FloatField')(null=True)),
            ('mcv', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('hct', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('rdw', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('mchc', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('mch', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('cr', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('bun', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('glu', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('na', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('k', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('cl', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('co2', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('cd4', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('cd4_percent',
             self.gf('django.db.models.fields.FloatField')(null=True)),
            ('cd8', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('sgpt', self.gf('django.db.models.fields.FloatField')(null=True)),
            ('alc', self.gf('django.db.models.fields.FloatField')(null=True)),
        ))
        db.send_create_signal(u'openmrs', ['LabResult'])

        # Adding model 'SystemsReview'
        db.create_table('systems_review', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('encounter',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['openmrs.Encounter'])),
            ('heent', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('chest', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('abdominal', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('cardiac', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('musculoskeletal', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('neurologic', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
        ))
        db.send_create_signal(u'openmrs', ['SystemsReview'])

        # Adding model 'HIVDetails'
        db.create_table('hiv_details', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('encounter',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['openmrs.Encounter'])),
            ('plan', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('treat_adhere', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('stage_adult', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('stage_adult_last', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('stage_peds', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('cdc_category', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('taking_antiretrovirals',
             self.gf('django.db.models.fields.CharField')(max_length=10,
                                                          null=True)),
            ('discordant_couple', self.gf('django.db.models.fields.CharField')(
                max_length=10, null=True)),
        ))
        db.send_create_signal(u'openmrs', ['HIVDetails'])

        # Adding model 'TBDetails'
        db.create_table('tb_details', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('encounter',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['openmrs.Encounter'])),
            ('treat_adhere', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('treat_plan', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('pro_adhere', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('pro_plan', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
        ))
        db.send_create_signal(u'openmrs', ['TBDetails'])

        # Adding model 'PCPDetails'
        db.create_table('pcp_details', (
            (u'id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('encounter',
             self.gf('django.db.models.fields.related.ForeignKey')(
                 to=orm['openmrs.Encounter'])),
            ('plan', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
            ('pro_adhere', self.gf('django.db.models.fields.CharField')(
                max_length=30, null=True)),
        ))
        db.send_create_signal(u'openmrs', ['PCPDetails'])
コード例 #60
0
    def forwards(self, orm):
        # Adding model 'Chromosome'
        db.create_table(u'snpdb_chromosome', (
            ('chromosome_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('chromosome_name', self.gf('django.db.models.fields.CharField')(max_length=50)),
            ('size', self.gf('django.db.models.fields.IntegerField')()),
            ('genome_name', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ngsdbview.Organism'], to_field='organismcode')),
            ('genome_version', self.gf('django.db.models.fields.CharField')(max_length=50)),
        ))
        db.send_create_signal(u'snpdb', ['Chromosome'])

        # Adding model 'Effect'
        db.create_table(u'snpdb_effect', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('snp', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['snpdb.SNP'])),
            ('effect', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['snpdb.Effect_CV'])),
            ('effect_class', self.gf('django.db.models.fields.TextField')()),
            ('effect_string', self.gf('django.db.models.fields.TextField')()),
            ('effect_group', self.gf('django.db.models.fields.IntegerField')()),
        ))
        db.send_create_signal(u'snpdb', ['Effect'])

        # Adding model 'Effect_CV'
        db.create_table(u'snpdb_effect_cv', (
            ('effect_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('effect_name', self.gf('django.db.models.fields.CharField')(max_length=45)),
        ))
        db.send_create_signal(u'snpdb', ['Effect_CV'])

        # Adding model 'Filter'
        db.create_table(u'snpdb_filter', (
            ('snp', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['snpdb.SNP'])),
            ('filter_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('filter_result', self.gf('django.db.models.fields.BooleanField')()),
            ('filter_cv', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['snpdb.Filter_CV'])),
        ))
        db.send_create_signal(u'snpdb', ['Filter'])

        # Adding model 'Filter_CV'
        db.create_table(u'snpdb_filter_cv', (
            ('filter_cv_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('filter_type', self.gf('django.db.models.fields.TextField')()),
        ))
        db.send_create_signal(u'snpdb', ['Filter_CV'])

        # Adding model 'SNP'
        db.create_table(u'snpdb_snp', (
            ('snp_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('snp_position', self.gf('django.db.models.fields.IntegerField')()),
            ('result', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ngsdbview.Result'])),
            ('vcf', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['snpdb.VCF_Files'])),
            ('ref_base', self.gf('django.db.models.fields.TextField')()),
            ('alt_base', self.gf('django.db.models.fields.TextField')()),
            ('heterozygosity', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)),
            ('quality', self.gf('django.db.models.fields.IntegerField')()),
            ('library', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['samples.Library'])),
            ('chromosome', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['snpdb.Chromosome'])),
        ))
        db.send_create_signal(u'snpdb', ['SNP'])

        # Adding model 'SNP_Type'
        db.create_table(u'snpdb_snp_type', (
            ('snptype_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('snp', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['snpdb.SNP'])),
            ('indel', self.gf('django.db.models.fields.BooleanField')()),
            ('deletion', self.gf('django.db.models.fields.BooleanField')()),
            ('is_snp', self.gf('django.db.models.fields.BooleanField')()),
            ('monomorphic', self.gf('django.db.models.fields.BooleanField')()),
            ('transition', self.gf('django.db.models.fields.BooleanField')()),
            ('sv', self.gf('django.db.models.fields.BooleanField')()),
        ))
        db.send_create_signal(u'snpdb', ['SNP_Type'])

        # Adding model 'Statistics_cv'
        db.create_table(u'snpdb_statistics_cv', (
            ('stats_cvterm_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('cvterm', self.gf('django.db.models.fields.CharField')(unique=True, max_length=50)),
            ('cv_notes', self.gf('django.db.models.fields.TextField')()),
        ))
        db.send_create_signal(u'snpdb', ['Statistics_cv'])

        # Adding model 'Statistics'
        db.create_table(u'snpdb_statistics', (
            ('stats_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('snp', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['snpdb.SNP'])),
            ('stats_cvterm', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['snpdb.Statistics_cv'], to_field='cvterm')),
            ('cv_value', self.gf('django.db.models.fields.CharField')(max_length=50)),
        ))
        db.send_create_signal(u'snpdb', ['Statistics'])

        # Adding model 'SNP_External_DBReference'
        db.create_table(u'snpdb_snp_external_dbreference', (
            ('snp', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['snpdb.SNP'])),
            ('databaseReference_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('db_name', self.gf('django.db.models.fields.CharField')(max_length=50)),
            ('url', self.gf('django.db.models.fields.CharField')(max_length=100)),
        ))
        db.send_create_signal(u'snpdb', ['SNP_External_DBReference'])

        # Adding model 'VCF_Files'
        db.create_table(u'snpdb_vcf_files', (
            ('vcf_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('vcf_path', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)),
            ('library', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['samples.Library'])),
            ('result', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ngsdbview.Result'])),
            ('vcf_md5sum', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
            ('date_uploaded', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
            ('date_modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
        ))
        db.send_create_signal(u'snpdb', ['VCF_Files'])

        # Adding model 'CNV'
        db.create_table(u'snpdb_cnv', (
            ('cnv_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('chromosome', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['snpdb.Chromosome'])),
            ('coordinate', self.gf('django.db.models.fields.IntegerField')()),
            ('CNV_value', self.gf('django.db.models.fields.IntegerField')()),
            ('library', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['samples.Library'])),
            ('result', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ngsdbview.Result'])),
        ))
        db.send_create_signal(u'snpdb', ['CNV'])