当前位置: 首页>>代码示例>>Python>>正文


Python db.create_table函数代码示例

本文整理汇总了Python中south.db.db.create_table函数的典型用法代码示例。如果您正苦于以下问题:Python create_table函数的具体用法?Python create_table怎么用?Python create_table使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了create_table函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: forwards

    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'])
开发者ID:acfrmarine,项目名称:squidle,代码行数:26,代码来源:0001_initial.py

示例2: forwards

    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))
开发者ID:Ufadhili,项目名称:Ajibika,代码行数:26,代码来源:0012_auto__add_projectvideo__add_field_project_contractor__chg_field_projec.py

示例3: forwards

    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'])
开发者ID:cjmartin,项目名称:thisismycam,代码行数:25,代码来源:0001_initial.py

示例4: forwards

 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'])
开发者ID:simodalla,项目名称:openpa-pages4gov,代码行数:27,代码来源:0002_auto__add_consigliocomunaleevent.py

示例5: forwards

    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))
开发者ID:ejaury,项目名称:maitreya_van,代码行数:25,代码来源:0003_add_calendar_group.py

示例6: forwards

    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']))
开发者ID:masarliev,项目名称:gitlog,代码行数:35,代码来源:0002_auto__del_field_project_private__del_field_project_source__add_field_p.py

示例7: forwards

    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)
开发者ID:hochbergg,项目名称:petulant-avenger,代码行数:28,代码来源:0013_auto__add_dynamicpage__del_field_navbarlink_url__add_field_navbarlink_.py

示例8: forwards

    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"])
开发者ID:jadavbheda,项目名称:gcd-django,代码行数:27,代码来源:0001_initial.py

示例9: forwards

 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'])
开发者ID:tomoconnor,项目名称:musikov,代码行数:7,代码来源:0002_auto__add_uploadedfile.py

示例10: backwards

    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))
开发者ID:neudesk,项目名称:20thst,代码行数:25,代码来源:0015_auto__chg_field_event_category__chg_field_event_fr__chg_field_event_co.py

示例11: forwards

    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'])
开发者ID:LucasFievet,项目名称:Tomorrow,代码行数:26,代码来源:0002_auto__add_field__del_field_countryproduction_depth__add_unique_country.py

示例12: forwards

    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'])
开发者ID:indexofire,项目名称:django-entrez,代码行数:33,代码来源:0001_initial.py

示例13: forwards

    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'])
开发者ID:saturnisbig,项目名称:_17relax,代码行数:26,代码来源:0001_initial.py

示例14: forwards

    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)
开发者ID:andergmartins,项目名称:tcamp,代码行数:25,代码来源:0003_auto__del_field_sponsorshiplevel_content_type__del_field_sponsorshiple.py

示例15: forwards

    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)
开发者ID:socib,项目名称:grumers,代码行数:34,代码来源:0010_auto__add_jellyfishincident__add_flagchange__add_field_observationrout.py


注:本文中的south.db.db.create_table函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。