Advertisement
Guest User

Untitled

a guest
May 12th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.13 KB | None | 0 0
  1. # This schema gives me the error below, even if i move the models folder and creates empty models/Base folders
  2. # SQLSTATE[HY000]: General error: 1005 Can't create table './arbetsorder_dev/#sql-87b_d4e.frm' (errno: 150). Failing Query: "ALTER TABLE group_user ADD CONSTRAINT group_user_group_id_groups_account_id FOREIGN KEY (group_id) REFERENCES groups(account_id)". Failing Query: ALTER TABLE group_user ADD CONSTRAINT group_user_group_id_groups_account_id FOREIGN KEY (group_id) REFERENCES groups(account_id)
  3. #
  4. #
  5.  
  6. Account:
  7. columns:
  8. id:
  9. type: string(32)
  10. primary: true
  11. name:
  12. type: string(128)
  13. notnull: true
  14. actAs:
  15. SoftDelete:
  16. name: "deleted"
  17. Timestampable:
  18. created:
  19. name: "created"
  20. updated:
  21. name: "updated"
  22. User:
  23. columns:
  24. id:
  25. type: integer
  26. primary: true
  27. account_id:
  28. primary: true
  29. type: string(32)
  30. notnull: true
  31. name:
  32. type: string(128)
  33. notnull: true
  34. email:
  35. type: string(64)
  36. unique: false
  37. notnull: true
  38. password:
  39. type: string(64)
  40. notnull: true
  41. salt:
  42. type: string(64)
  43. notnull: true
  44. relations:
  45. Account:
  46. type: one
  47. local: account_id
  48. foreign: id
  49. foreignType: many
  50. foreignAlias: Users
  51.  
  52. actAs:
  53. SoftDelete:
  54. name: "deleted"
  55. Timestampable:
  56. created:
  57. name: "created"
  58. updated:
  59. name: "updated"
  60.  
  61. Group:
  62. tableName: groups
  63. columns:
  64. id:
  65. type: integer
  66. primary: true
  67. account_id:
  68. primary: true
  69. type: string(32)
  70. notnull: true
  71. name:
  72. type: string(64)
  73. notnull: true
  74. description:
  75. type: text
  76. notnull: false
  77. relations:
  78. Account:
  79. class: Account
  80. local: account_id
  81. type: one
  82. foreign: id
  83. foreignType: many
  84. foreignAlias: Groups
  85. Users:
  86. class: User
  87. local: group_id
  88. type: many
  89. foreign: user_id
  90. foreignType: many
  91. foreignAlias: Groups
  92. refClass: GroupUser
  93. actAs:
  94. SoftDelete:
  95. name: "deleted"
  96. Timestampable:
  97. created:
  98. name: "created"
  99. updated:
  100. name: "updated"
  101.  
  102. GroupUser:
  103. columns:
  104. group_id:
  105. type: integer
  106. primary: true
  107. account_id:
  108. primary: true
  109. type: string(32)
  110. user_id:
  111. type: integer
  112. primary: true
  113. actAs:
  114. SoftDelete:
  115. name: "deleted"
  116. Timestampable:
  117. created:
  118. name: "created"
  119. updated:
  120. name: "updated"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement