Advertisement
Guest User

Untitled

a guest
Jun 10th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.73 KB | None | 0 0
  1. Auditor:
  2.   columns:
  3.     id:
  4.       type: integer
  5.       autoincrement: true
  6.       primary: true
  7.     username:
  8.       type: string(255)
  9.     password:
  10.       type: string(255)
  11.     fullname:
  12.       type: string(255)
  13.     is_auditor:
  14.       type: integer
  15.     is_manager:
  16.       type: integer
  17.     is_director:
  18.       type: integer
  19.  
  20. Task:
  21.   columns:
  22.     id:
  23.       type: integer
  24.       autoincrement: true
  25.       primary: true
  26.     client:
  27.       type: string(255)
  28.     start_date:
  29.       type: date
  30.     end_date:
  31.       type: date
  32.     assigned_by:
  33.       type: string(255)
  34.     comments:
  35.       type: string
  36.     status:
  37.       type: integer
  38.   relations:
  39.     Auditors:
  40.       foreignAlias: Tasks
  41.       class: Auditor
  42.       refClass: AuditorTask
  43.    
  44. AuditorTask:
  45.   columns:
  46.     auditor_id:
  47.       type: integer
  48.       primary: true
  49.     task_id:
  50.       type: integer
  51.       primary: true
  52.   relations:
  53.     Auditor:
  54.       foreignAlias: AuditorTasks
  55.     Task:
  56.       foreignAlias: AuditorTasks
  57.  
  58. Expense:
  59.   columns:
  60.     id:
  61.       type: integer
  62.       autoincrement: true
  63.       primary: true
  64.     auditor_task_id:
  65.       type: integer
  66.     date:
  67.       type: date
  68.     hours_spent:
  69.       type: integer
  70.     transport_cost:
  71.       type: float
  72.     remarks:
  73.       type: string
  74.   relations:
  75.     AuditorTask:
  76.       foreignAlias: Expenses
  77.  
  78. Error i'm getting:
  79. SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'id' doesn't exist in table. Failing Query: "CREATE TABLE auditor_task (auditor_id BIGINT,task_id BIGINT, INDEX id_idx (id), PRIMARY KEY(auditor_id, task_id))ENGINE = INNODB". Failing Query: CREATE TABLE auditor_task (auditor_id BIGINT, task_id BIGINT, INDEX id_idx (id), PRIMARY KEY(auditor_id, task_id)) ENGINE = INNODB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement