django.db.utils.ProgrammingError:为表“ Asset_movie”的列“ _id”指定了多个默认值

时间:2019-01-10 11:33:04

标签: python django postgresql-10

进行迁移之后,我尝试进行迁移,但是我得到了django.db.utils.ProgrammingError:为表“ Asset_movie”的列“ _id”指定了多个默认值

from django.db import models
import date time
from django.contrib import admin

class Movie(models.Model):   
        CHOICES_MOVIE_TYPE = (
             ("SF", 'Short-Film'),
             ("P", "Promo"),
             ("OT", 'Other'),
         );
           CHOICES_LANGUAGE_TYPE = (
               (" ", ''),

           );
           CHOICES_ORIGINAL_OWNER_TYPE = (
               ("OT", 'Other'),

           );
           CHOICES_REMARK_TYPE = (

           );
          # _id = models.AutoField(primary_key=True)
           name = models.CharField(max_length = 50, blank = False)
           Movie_Type = models.CharField(max_length = 2, choices = CHOICES_MOVIE_TYPE, default = "OT", blank = False)
           language = models.CharField(max_length = 5, choices=CHOICES_LANGUAGE_TYPE, default = "OT", blank = False)enter code here
           tags = models.TextField()
           original_owner = models.CharField(max_length = 2, choices = CHOICES_ORIGINAL_OWNER_TYPE, default = "OT", blank = False)
           Partner = models.CharField(max_length = 10)
           acquisition_cost = models.DecimalField(max_digits = 5, decimal_places = 4,  blank = True)
           release_date = models.DateField(("Date"), default = datetime.date.today)

0 个答案:

没有答案