【Django】如何转化已有的数据表到Django模型--20230823

初步生成model.py

$ python manage.py inspectdb

$ python manage.py inspectdb > models.py

python 复制代码
python manage.py inspectdb
# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
#   * Rearrange models' order
#   * Make sure each model has one field with primary_key=True
#   * Make sure each ForeignKey and OneToOneField has `on_delete` set to the desired behavior
#   * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
# Feel free to rename the models, but don't rename db_table values or field names.
from django.db import models


class AuthGroup(models.Model):
    name = models.CharField(unique=True, max_length=150)

    class Meta:
        managed = False
        db_table = 'auth_group'


class AuthGroupPermissions(models.Model):
    id = models.BigAutoField(primary_key=True)
    group = models.ForeignKey(AuthGroup, models.DO_NOTHING)
    permission = models.ForeignKey('AuthPermission', models.DO_NOTHING)

    class Meta:
        managed = False
        db_table = 'auth_group_permissions'
        unique_together = (('group', 'permission'),)


class AuthPermission(models.Model):
    name = models.CharField(max_length=255)
    content_type = models.ForeignKey('DjangoContentType', models.DO_NOTHING)
    codename = models.CharField(max_length=100)

    class Meta:
        managed = False
        db_table = 'auth_permission'
        unique_together = (('content_type', 'codename'),)


class AuthUser(models.Model):
    password = models.CharField(max_length=128)
    last_login = models.DateTimeField(blank=True, null=True)
    is_superuser = models.IntegerField()
    username = models.CharField(unique=True, max_length=150)
    first_name = models.CharField(max_length=150)
    last_name = models.CharField(max_length=150)
    email = models.CharField(max_length=254)
    is_staff = models.IntegerField()
    is_active = models.IntegerField()
    date_joined = models.DateTimeField()

    class Meta:
        managed = False
        db_table = 'auth_user'


class AuthUserGroups(models.Model):
    id = models.BigAutoField(primary_key=True)
    user = models.ForeignKey(AuthUser, models.DO_NOTHING)
    group = models.ForeignKey(AuthGroup, models.DO_NOTHING)

    class Meta:
        managed = False
        db_table = 'auth_user_groups'
        unique_together = (('user', 'group'),)


class AuthUserUserPermissions(models.Model):
    id = models.BigAutoField(primary_key=True)
    user = models.ForeignKey(AuthUser, models.DO_NOTHING)
    permission = models.ForeignKey(AuthPermission, models.DO_NOTHING)

    class Meta:
        managed = False
        db_table = 'auth_user_user_permissions'
        unique_together = (('user', 'permission'),)


class Config(models.Model):
    id = models.BigAutoField(primary_key=True)
    config1 = models.CharField(max_length=135, blank=True, null=True)
    config2 = models.CharField(max_length=135, blank=True, null=True)
    config3 = models.CharField(max_length=135, blank=True, null=True)
    config4 = models.CharField(max_length=135, blank=True, null=True)
    config5 = models.CharField(max_length=135, blank=True, null=True)
    config6 = models.CharField(max_length=135, blank=True, null=True)
    config7 = models.CharField(max_length=135, blank=True, null=True)
    config8 = models.CharField(max_length=135, blank=True, null=True)
    config9 = models.CharField(max_length=135, blank=True, null=True)
    config10 = models.CharField(max_length=135, blank=True, null=True)
    config11 = models.CharField(max_length=135, blank=True, null=True)
    config12 = models.CharField(max_length=135, blank=True, null=True)
    config13 = models.CharField(max_length=135, blank=True, null=True)
    config14 = models.CharField(max_length=135, blank=True, null=True)
    config15 = models.CharField(max_length=135, blank=True, null=True)
    config16 = models.CharField(max_length=135, blank=True, null=True)
    config17 = models.CharField(max_length=135, blank=True, null=True)
    config18 = models.CharField(max_length=135, blank=True, null=True)
    config19 = models.CharField(max_length=135, blank=True, null=True)
    config20 = models.CharField(max_length=135, blank=True, null=True)
    config21 = models.CharField(max_length=135, blank=True, null=True)
    config22 = models.CharField(max_length=135, blank=True, null=True)
    config23 = models.CharField(max_length=135, blank=True, null=True)
    config24 = models.CharField(max_length=135, blank=True, null=True)
    config25 = models.CharField(max_length=135, blank=True, null=True)
    config26 = models.CharField(max_length=135, blank=True, null=True)
    config27 = models.CharField(max_length=135, blank=True, null=True)
    config28 = models.CharField(max_length=135, blank=True, null=True)
    config29 = models.CharField(max_length=135, blank=True, null=True)
    config30 = models.CharField(max_length=135, blank=True, null=True)
    config31 = models.CharField(max_length=135, blank=True, null=True)
    config32 = models.CharField(max_length=135, blank=True, null=True)
    config33 = models.CharField(max_length=135, blank=True, null=True)
    config34 = models.CharField(max_length=135, blank=True, null=True)
    config35 = models.CharField(max_length=135, blank=True, null=True)
    config36 = models.CharField(max_length=135, blank=True, null=True)
    config37 = models.CharField(max_length=135, blank=True, null=True)
    config38 = models.CharField(max_length=135, blank=True, null=True)
    config39 = models.CharField(max_length=135, blank=True, null=True)
    config40 = models.CharField(max_length=135, blank=True, null=True)
    config41 = models.CharField(max_length=135, blank=True, null=True)
    config42 = models.CharField(max_length=135, blank=True, null=True)
    config43 = models.CharField(max_length=135, blank=True, null=True)
    config44 = models.CharField(max_length=135, blank=True, null=True)
    config45 = models.CharField(max_length=135, blank=True, null=True)
    config46 = models.CharField(max_length=135, blank=True, null=True)
    config47 = models.CharField(max_length=135, blank=True, null=True)
    config48 = models.CharField(max_length=135, blank=True, null=True)
    config49 = models.CharField(max_length=135, blank=True, null=True)
    config50 = models.CharField(max_length=135, blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'config'


class CsodTrainingAndTestRecord2(models.Model):
    id = models.BigAutoField(primary_key=True)
    user = models.CharField(db_column='USER', max_length=135, blank=True, null=True)  # Field name made lowercase.
    user_id = models.CharField(db_column='USER_ID', max_length=135, blank=True, null=True)  # Field name made lowercase.
    training_title = models.CharField(db_column='TRAINING_TITLE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    training_version = models.CharField(db_column='TRAINING_VERSION', max_length=135, blank=True, null=True)  # Field name made lowercase.
    training_type = models.CharField(db_column='TRAINING_TYPE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    training_vendor = models.CharField(db_column='TRAINING_VENDOR', max_length=135, blank=True, null=True)  # Field name made lowercase.
    training_status = models.CharField(db_column='TRAINING_STATUS', max_length=135, blank=True, null=True)  # Field name made lowercase.
    training_hours = models.CharField(db_column='TRAINING_HOURS', max_length=135, blank=True, null=True)  # Field name made lowercase.
    credits = models.CharField(db_column='CREDITS', max_length=135, blank=True, null=True)  # Field name made lowercase.
    training_record_date = models.DateTimeField(db_column='TRAINING_RECORD_DATE', blank=True, null=True)  # Field name made lowercase.
    accommodation_expense = models.CharField(db_column='Accommodation_Expense', max_length=135, blank=True, null=True)  # Field name made lowercase.
    apply_reason = models.CharField(db_column='Apply_Reason', max_length=135, blank=True, null=True)  # Field name made lowercase.
    compulsory_elective = models.CharField(db_column='Compulsory_Elective', max_length=135, blank=True, null=True)  # Field name made lowercase.
    course_owner = models.CharField(db_column='Course_Owner', max_length=135, blank=True, null=True)  # Field name made lowercase.
    currency = models.CharField(db_column='Currency', max_length=135, blank=True, null=True)  # Field name made lowercase.
    facility_expense = models.CharField(db_column='Facility_Expense', max_length=135, blank=True, null=True)  # Field name made lowercase.
    instructor_expense = models.CharField(db_column='Instructor_Expense', max_length=135, blank=True, null=True)  # Field name made lowercase.
    instructor_full_name = models.CharField(db_column='Instructor_Full_Name', max_length=135, blank=True, null=True)  # Field name made lowercase.
    instructor_id = models.CharField(db_column='Instructor_ID', max_length=135, blank=True, null=True)  # Field name made lowercase.
    instructor_type = models.CharField(db_column='Instructor_Type', max_length=135, blank=True, null=True)  # Field name made lowercase.
    material_expense = models.CharField(db_column='Material_Expense', max_length=135, blank=True, null=True)  # Field name made lowercase.
    meal_expense = models.CharField(db_column='Meal_Expense', max_length=135, blank=True, null=True)  # Field name made lowercase.
    note = models.CharField(db_column='Note', max_length=135, blank=True, null=True)  # Field name made lowercase.
    other_expense = models.CharField(db_column='Other_Expense', max_length=135, blank=True, null=True)  # Field name made lowercase.
    training_type_2 = models.CharField(db_column='Training_Type_2', max_length=135, blank=True, null=True)  # Field name made lowercase.
    transportation_expense = models.CharField(db_column='Transportation_Expense', max_length=135, blank=True, null=True)  # Field name made lowercase.
    unfinished_training_fee = models.CharField(db_column='Unfinished_Training_Fee', max_length=135, blank=True, null=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'csod_training_and_test_record2'


class DjangoAdminLog(models.Model):
    action_time = models.DateTimeField()
    object_id = models.TextField(blank=True, null=True)
    object_repr = models.CharField(max_length=200)
    action_flag = models.PositiveSmallIntegerField()
    change_message = models.TextField()
    content_type = models.ForeignKey('DjangoContentType', models.DO_NOTHING, blank=True, null=True)
    user = models.ForeignKey(AuthUser, models.DO_NOTHING)

    class Meta:
        managed = False
        db_table = 'django_admin_log'


class DjangoContentType(models.Model):
    app_label = models.CharField(max_length=100)
    model = models.CharField(max_length=100)

    class Meta:
        managed = False
        db_table = 'django_content_type'
        unique_together = (('app_label', 'model'),)


class DjangoMigrations(models.Model):
    id = models.BigAutoField(primary_key=True)
    app = models.CharField(max_length=255)
    name = models.CharField(max_length=255)
    applied = models.DateTimeField()

    class Meta:
        managed = False
        db_table = 'django_migrations'


class DjangoSession(models.Model):
    session_key = models.CharField(primary_key=True, max_length=40)
    session_data = models.TextField()
    expire_date = models.DateTimeField()

    class Meta:
        managed = False
        db_table = 'django_session'


class EnglishPasslist(models.Model):
    id = models.BigAutoField(primary_key=True)
    function_name = models.CharField(db_column='FUNCTION_NAME', max_length=135, blank=True, null=True)  # Field name made lowercase.
    department = models.CharField(db_column='DEPARTMENT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    engfunc = models.CharField(db_column='ENGFUNC', max_length=135, blank=True, null=True)  # Field name made lowercase.
    employee_id = models.CharField(db_column='EMPLOYEE_ID', max_length=135, blank=True, null=True)  # Field name made lowercase.
    chinese_name = models.CharField(db_column='CHINESE_NAME', max_length=135, blank=True, null=True)  # Field name made lowercase.
    entry_date = models.DateTimeField(db_column='ENTRY_DATE', blank=True, null=True)  # Field name made lowercase.
    group_grade = models.CharField(db_column='GROUP_GRADE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    highestscores = models.CharField(db_column='HIGHESTSCORES', max_length=135, blank=True, null=True)  # Field name made lowercase.
    highestscores_test_date = models.CharField(db_column='HIGHESTSCORES_TEST_DATE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    passcurrent = models.CharField(db_column='PASSCURRENT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    highestscores_2year = models.CharField(db_column='HIGHESTSCORES_2YEAR', max_length=135, blank=True, null=True)  # Field name made lowercase.
    highestscores_2year_test_date = models.CharField(db_column='HIGHESTSCORES_2YEAR_TEST_DATE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    highestscores_2year_invalid_date = models.CharField(db_column='HIGHESTSCORES_2YEAR_INVALID_DATE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    passcurrent_2year = models.CharField(db_column='PASSCURRENT_2YEAR', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_high_grade_2year = models.CharField(db_column='PASS_HIGH_GRADE_2YEAR', max_length=135, blank=True, null=True)  # Field name made lowercase.
    trans_date = models.CharField(db_column='TRANS_DATE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    remark = models.CharField(db_column='REMARK', max_length=135, blank=True, null=True)  # Field name made lowercase.
    buffer1 = models.CharField(max_length=135, blank=True, null=True)
    buffer2 = models.CharField(max_length=135, blank=True, null=True)
    buffer3 = models.CharField(max_length=135, blank=True, null=True)
    buffer4 = models.CharField(max_length=135, blank=True, null=True)
    buffer5 = models.CharField(max_length=135, blank=True, null=True)
    buffer6 = models.CharField(max_length=135, blank=True, null=True)
    buffer7 = models.CharField(max_length=135, blank=True, null=True)
    buffer8 = models.CharField(max_length=135, blank=True, null=True)
    buffer9 = models.CharField(max_length=135, blank=True, null=True)
    buffer10 = models.CharField(max_length=135, blank=True, null=True)
    record_date = models.DateTimeField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'english_passlist'


class ManagementPasslist(models.Model):
    id = models.BigAutoField(primary_key=True)
    location = models.CharField(db_column='LOCATION', max_length=135, blank=True, null=True)  # Field name made lowercase.
    function_code = models.CharField(db_column='FUNCTION_CODE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    function_name = models.CharField(db_column='FUNCTION_NAME', max_length=135, blank=True, null=True)  # Field name made lowercase.
    deptid = models.CharField(db_column='DEPTID', max_length=135, blank=True, null=True)  # Field name made lowercase.
    grade_range = models.CharField(db_column='GRADE_RANGE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    emplid = models.CharField(db_column='EMPLID', max_length=135, blank=True, null=True)  # Field name made lowercase.
    name = models.CharField(db_column='NAME', max_length=135, blank=True, null=True)  # Field name made lowercase.
    current_range_course_total = models.CharField(db_column='CURRENT_RANGE_COURSE_TOTAL', max_length=135, blank=True, null=True)  # Field name made lowercase.
    current_range_1st_assessment_total = models.CharField(db_column='CURRENT_RANGE_1ST_ASSESSMENT_TOTAL', max_length=135, blank=True, null=True)  # Field name made lowercase.
    current_range_present_total = models.CharField(db_column='CURRENT_RANGE_PRESENT_TOTAL', max_length=135, blank=True, null=True)  # Field name made lowercase.
    current_range_2nd_assessment_total = models.CharField(db_column='CURRENT_RANGE_2ND_ASSESSMENT_TOTAL', max_length=135, blank=True, null=True)  # Field name made lowercase.
    p1_rate = models.CharField(db_column='P1_RATE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    p2_rate = models.CharField(db_column='P2_RATE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    p3_rate = models.CharField(db_column='P3_RATE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    current_range_rate = models.CharField(db_column='CURRENT_RANGE_RATE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    record_date = models.DateTimeField(blank=True, null=True)
    buffer1 = models.CharField(max_length=135, blank=True, null=True)
    buffer2 = models.CharField(max_length=135, blank=True, null=True)
    buffer3 = models.CharField(max_length=135, blank=True, null=True)
    buffer4 = models.CharField(max_length=135, blank=True, null=True)
    buffer5 = models.CharField(max_length=135, blank=True, null=True)
    buffer6 = models.CharField(max_length=135, blank=True, null=True)
    buffer7 = models.CharField(max_length=135, blank=True, null=True)
    buffer8 = models.CharField(max_length=135, blank=True, null=True)
    buffer9 = models.CharField(max_length=135, blank=True, null=True)
    buffer10 = models.CharField(max_length=135, blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'management_passlist'


class PeopleData(models.Model):
    pkid = models.IntegerField(blank=True, null=True)
    batchid = models.TextField(blank=True, null=True)
    bu = models.TextField(blank=True, null=True)
    bg = models.TextField(blank=True, null=True)
    site = models.TextField(blank=True, null=True)
    plant = models.TextField(blank=True, null=True)
    emplid = models.TextField(blank=True, null=True)
    name = models.TextField(blank=True, null=True)
    name_a = models.TextField(blank=True, null=True)
    hire_dt = models.DateTimeField(blank=True, null=True)
    sal_location_a = models.TextField(blank=True, null=True)
    company = models.TextField(blank=True, null=True)
    deptid = models.TextField(blank=True, null=True)
    location = models.TextField(blank=True, null=True)
    jobtitle_descr = models.TextField(blank=True, null=True)
    emailid = models.TextField(blank=True, null=True)
    email_address_a = models.TextField(blank=True, null=True)
    phone_a = models.TextField(blank=True, null=True)
    officer_level_a = models.TextField(blank=True, null=True)
    supervisor_id = models.TextField(blank=True, null=True)
    tree_level_num = models.TextField(blank=True, null=True)
    termination_dt = models.DateTimeField(blank=True, null=True)
    labor_type = models.TextField(blank=True, null=True)
    job_family = models.TextField(blank=True, null=True)
    grade = models.TextField(blank=True, null=True)
    job_entry_dt = models.DateTimeField(blank=True, null=True)
    grade_entry_dt = models.DateTimeField(blank=True, null=True)
    job_title_a = models.TextField(blank=True, null=True)
    last_updt_dt = models.DateTimeField(blank=True, null=True)
    jobcode = models.TextField(blank=True, null=True)
    action_reason = models.TextField(blank=True, null=True)
    sex = models.TextField(blank=True, null=True)
    birthdate = models.DateTimeField(blank=True, null=True)
    batch_id = models.TextField(blank=True, null=True)
    version_id = models.IntegerField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'people_data'


class ProfessionPasslist(models.Model):
    id = models.BigAutoField(primary_key=True)
    location = models.CharField(db_column='LOCATION', max_length=135, blank=True, null=True)  # Field name made lowercase.
    function_code = models.CharField(db_column='FUNCTION_CODE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    function_name = models.CharField(db_column='FUNCTION_NAME', max_length=135, blank=True, null=True)  # Field name made lowercase.
    department = models.CharField(db_column='DEPARTMENT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    employee_id = models.CharField(db_column='EMPLOYEE_ID', max_length=135, blank=True, null=True)  # Field name made lowercase.
    chinese_name = models.CharField(db_column='CHINESE_NAME', max_length=135, blank=True, null=True)  # Field name made lowercase.
    entry_date = models.DateTimeField(db_column='ENTRY_DATE', blank=True, null=True)  # Field name made lowercase.
    group_grade = models.CharField(db_column='GROUP_GRADE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    effected_date = models.CharField(db_column='EFFECTED_DATE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_all = models.CharField(db_column='PASS_ALL', max_length=135, blank=True, null=True)  # Field name made lowercase.
    all_small_test_current = models.CharField(db_column='ALL_SMALL_TEST_CURRENT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_small_test_current = models.CharField(db_column='PASS_SMALL_TEST_CURRENT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    all_middle_test_current = models.CharField(db_column='ALL_MIDDLE_TEST_CURRENT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_middle_test_current = models.CharField(db_column='PASS_MIDDLE_TEST_CURRENT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    all_final_test_current = models.CharField(db_column='ALL_FINAL_TEST_CURRENT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_final_test_current = models.CharField(db_column='PASS_FINAL_TEST_CURRENT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    all_others_test_current = models.CharField(db_column='ALL_OTHERS_TEST_CURRENT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_others_test_current = models.CharField(db_column='PASS_OTHERS_TEST_CURRENT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_testrate_current = models.CharField(db_column='PASS_TESTRATE_CURRENT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    all_training_next = models.CharField(db_column='ALL_TRAINING_NEXT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_traning_next = models.CharField(db_column='PASS_TRANING_NEXT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_trainingrate_next = models.CharField(db_column='PASS_TRAININGRATE_NEXT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    all_small_test_next = models.CharField(db_column='ALL_SMALL_TEST_NEXT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_small_test_next = models.CharField(db_column='PASS_SMALL_TEST_NEXT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    all_middle_test_next = models.CharField(db_column='ALL_MIDDLE_TEST_NEXT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_middle_test_next = models.CharField(db_column='PASS_MIDDLE_TEST_NEXT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    all_final_test_next = models.CharField(db_column='ALL_FINAL_TEST_NEXT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_final_test_next = models.CharField(db_column='PASS_FINAL_TEST_NEXT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    all_others_test_next = models.CharField(db_column='ALL_OTHERS_TEST_NEXT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_others_test_next = models.CharField(db_column='PASS_OTHERS_TEST_NEXT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_testrate_next = models.CharField(db_column='PASS_TESTRATE_NEXT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    trans_date = models.CharField(db_column='TRANS_DATE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    remark = models.CharField(db_column='REMARK', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_trans_cur = models.CharField(db_column='PASS_TRANS_CUR', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_trans_nex = models.CharField(db_column='PASS_TRANS_NEX', max_length=135, blank=True, null=True)  # Field name made lowercase.
    buffer1 = models.CharField(max_length=135, blank=True, null=True)
    buffer10 = models.CharField(max_length=135, blank=True, null=True)
    buffer2 = models.CharField(max_length=135, blank=True, null=True)
    buffer3 = models.CharField(max_length=135, blank=True, null=True)
    buffer4 = models.CharField(max_length=135, blank=True, null=True)
    buffer5 = models.CharField(max_length=135, blank=True, null=True)
    buffer6 = models.CharField(max_length=135, blank=True, null=True)
    buffer7 = models.CharField(max_length=135, blank=True, null=True)
    buffer8 = models.CharField(max_length=135, blank=True, null=True)
    buffer9 = models.CharField(max_length=135, blank=True, null=True)
    record_date = models.DateTimeField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'profession_passlist'


class TrainingImportCsodTrainingAndTestRecordForModel(models.Model):
    id = models.BigAutoField(primary_key=True)
    file = models.CharField(max_length=100)
    name = models.CharField(max_length=50)

    class Meta:
        managed = False
        db_table = 'training_import_csod_training_and_test_record_for_model'


class TrainingImportEnglishPasslistForModel(models.Model):
    id = models.BigAutoField(primary_key=True)
    file = models.CharField(max_length=100)
    name = models.CharField(max_length=50)

    class Meta:
        managed = False
        db_table = 'training_import_english_passlist_for_model'


class TrainingImportManagementPasslistForModel(models.Model):
    id = models.BigAutoField(primary_key=True)
    file = models.CharField(max_length=100)
    name = models.CharField(max_length=50)

    class Meta:
        managed = False
        db_table = 'training_import_management_passlist_for_model'


class TrainingImportProfessionPasslistForModel(models.Model):
    id = models.BigAutoField(primary_key=True)
    file = models.CharField(max_length=100)
    name = models.CharField(max_length=50)

    class Meta:
        managed = False
        db_table = 'training_import_profession_passlist_for_model'


class TrainingImportTrsTrainerMaintainForModel(models.Model):
    id = models.BigAutoField(primary_key=True)
    file = models.CharField(max_length=100)
    name = models.CharField(max_length=50)

    class Meta:
        managed = False
        db_table = 'training_import_trs_trainer_maintain_for_model'


class TrainingImportTrsTrainingAndTestRecordForModel(models.Model):
    id = models.BigAutoField(primary_key=True)
    file = models.CharField(max_length=100)
    name = models.CharField(max_length=50)

    class Meta:
        managed = False
        db_table = 'training_import_trs_training_and_test_record_for_model'


class TrainingImportZzRecordForModel(models.Model):
    id = models.BigAutoField(primary_key=True)
    file = models.CharField(max_length=100)
    name = models.CharField(max_length=50)

    class Meta:
        managed = False
        db_table = 'training_import_zz_record_for_model'


class TrsTrainerMaintain(models.Model):
    id = models.BigAutoField(primary_key=True)
    trainer_id = models.CharField(db_column='TRAINER_ID', max_length=135, blank=True, null=True)  # Field name made lowercase.
    trainer_name = models.CharField(db_column='TRAINER_NAME', max_length=135, blank=True, null=True)  # Field name made lowercase.
    deptment_id = models.CharField(db_column='DEPTMENT_ID', max_length=135, blank=True, null=True)  # Field name made lowercase.
    plant = models.CharField(db_column='PLANT', max_length=135, blank=True, null=True)  # Field name made lowercase.
    grade_code = models.CharField(db_column='GRADE_CODE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    score = models.CharField(db_column='SCORE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    honor = models.CharField(db_column='HONOR', max_length=135, blank=True, null=True)  # Field name made lowercase.
    effective_date = models.CharField(db_column='EFFECTIVE_DATE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    iscurrent_grade = models.CharField(db_column='ISCURRENT_GRADE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    update_user = models.CharField(db_column='UPDATE_USER', max_length=135, blank=True, null=True)  # Field name made lowercase.
    update_date = models.CharField(db_column='UPDATE_DATE', max_length=135, blank=True, null=True)  # Field name made lowercase.
    employeeid = models.CharField(db_column='EMPLOYEEID', max_length=135, blank=True, null=True)  # Field name made lowercase.
    location = models.CharField(db_column='LOCATION', max_length=135, blank=True, null=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'trs_trainer_maintain'


class TrsTrainingAndTestRecord(models.Model):
    id = models.BigAutoField(primary_key=True)
    location = models.CharField(db_column='Location', max_length=135, blank=True, null=True)  # Field name made lowercase.
    function_code = models.CharField(db_column='Function_Code', max_length=135, blank=True, null=True)  # Field name made lowercase.
    function_name = models.CharField(db_column='Function_Name', max_length=135, blank=True, null=True)  # Field name made lowercase.
    plant = models.CharField(db_column='Plant', max_length=135, blank=True, null=True)  # Field name made lowercase.
    dept = models.CharField(db_column='Dept', max_length=135, blank=True, null=True)  # Field name made lowercase.
    employee_no = models.CharField(db_column='Employee_NO', max_length=135, blank=True, null=True)  # Field name made lowercase.
    name = models.CharField(db_column='Name', max_length=135, blank=True, null=True)  # Field name made lowercase.
    grade_range = models.CharField(db_column='Grade_Range', max_length=135, blank=True, null=True)  # Field name made lowercase.
    training_type = models.CharField(db_column='Training_Type', max_length=135, blank=True, null=True)  # Field name made lowercase.
    priority = models.CharField(db_column='Priority', max_length=135, blank=True, null=True)  # Field name made lowercase.
    type = models.CharField(db_column='Type', max_length=135, blank=True, null=True)  # Field name made lowercase.
    course = models.CharField(db_column='Course', max_length=135, blank=True, null=True)  # Field name made lowercase.
    schedule_code = models.CharField(db_column='Schedule_Code', max_length=135, blank=True, null=True)  # Field name made lowercase.
    schedule_name = models.CharField(db_column='Schedule_Name', max_length=135, blank=True, null=True)  # Field name made lowercase.
    course_or_test = models.CharField(db_column='Course_or_Test', max_length=135, blank=True, null=True)  # Field name made lowercase.
    delivery_way_or_test_way = models.CharField(db_column='Delivery_Way_or_Test_Way', max_length=135, blank=True, null=True)  # Field name made lowercase.
    start_date = models.DateTimeField(db_column='Start_Date', blank=True, null=True)  # Field name made lowercase.
    end_date = models.DateTimeField(db_column='End_Date', blank=True, null=True)  # Field name made lowercase.
    present_status = models.CharField(db_column='Present_Status', max_length=135, blank=True, null=True)  # Field name made lowercase.
    pass_score = models.IntegerField(db_column='Pass_Score', blank=True, null=True)  # Field name made lowercase.
    listening_score = models.IntegerField(db_column='Listening_Score', blank=True, null=True)  # Field name made lowercase.
    reading_score = models.IntegerField(db_column='Reading_Score', blank=True, null=True)  # Field name made lowercase.
    score = models.IntegerField(db_column='Score', blank=True, null=True)  # Field name made lowercase.
    pass_yn = models.CharField(db_column='Pass_YN', max_length=135, blank=True, null=True)  # Field name made lowercase.
    effective_date = models.CharField(db_column='Effective_Date', max_length=135, blank=True, null=True)  # Field name made lowercase.
    duration = models.CharField(db_column='Duration', max_length=135, blank=True, null=True)  # Field name made lowercase.
    venue = models.CharField(db_column='Venue', max_length=135, blank=True, null=True)  # Field name made lowercase.
    trainer_assesor = models.CharField(db_column='Trainer_Assesor', max_length=135, blank=True, null=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'trs_training_and_test_record'


class ZzRecord(models.Model):
    id = models.BigAutoField(primary_key=True)
    employee_id = models.CharField(db_column='Employee_ID', max_length=135, blank=True, null=True)  # Field name made lowercase.
    name = models.CharField(db_column='Name', max_length=135, blank=True, null=True)  # Field name made lowercase.
    role = models.CharField(db_column='Role', max_length=135, blank=True, null=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'zz_record'

修改部分信息

pkid = models.IntegerField(primary_key=True)

相关推荐
Ai 编码助手28 分钟前
MySQL中distinct与group by之间的性能进行比较
数据库·mysql
陈燚_重生之又为程序员44 分钟前
基于梧桐数据库的实时数据分析解决方案
数据库·数据挖掘·数据分析
caridle1 小时前
教程:使用 InterBase Express 访问数据库(五):TIBTransaction
java·数据库·express
白云如幻1 小时前
MySQL排序查询
数据库·mysql
萧鼎1 小时前
Python并发编程库:Asyncio的异步编程实战
开发语言·数据库·python·异步
^velpro^1 小时前
数据库连接池的创建
java·开发语言·数据库
荒川之神1 小时前
ORACLE _11G_R2_ASM 常用命令
数据库·oracle
IT培训中心-竺老师1 小时前
Oracle 23AI创建示例库
数据库·oracle
Wx-bishekaifayuan1 小时前
django电商易购系统-计算机设计毕业源码61059
java·spring boot·spring·spring cloud·django·sqlite·guava
小白学大数据1 小时前
JavaScript重定向对网络爬虫的影响及处理
开发语言·javascript·数据库·爬虫