Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This schema gives me the error below, even if i move the models folder and creates empty models/Base folders
- # 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)
- #
- #
- Account:
- columns:
- id:
- type: string(32)
- primary: true
- name:
- type: string(128)
- notnull: true
- actAs:
- SoftDelete:
- name: "deleted"
- Timestampable:
- created:
- name: "created"
- updated:
- name: "updated"
- User:
- columns:
- id:
- type: integer
- primary: true
- account_id:
- primary: true
- type: string(32)
- notnull: true
- name:
- type: string(128)
- notnull: true
- email:
- type: string(64)
- unique: false
- notnull: true
- password:
- type: string(64)
- notnull: true
- salt:
- type: string(64)
- notnull: true
- relations:
- Account:
- type: one
- local: account_id
- foreign: id
- foreignType: many
- foreignAlias: Users
- actAs:
- SoftDelete:
- name: "deleted"
- Timestampable:
- created:
- name: "created"
- updated:
- name: "updated"
- Group:
- tableName: groups
- columns:
- id:
- type: integer
- primary: true
- account_id:
- primary: true
- type: string(32)
- notnull: true
- name:
- type: string(64)
- notnull: true
- description:
- type: text
- notnull: false
- relations:
- Account:
- class: Account
- local: account_id
- type: one
- foreign: id
- foreignType: many
- foreignAlias: Groups
- Users:
- class: User
- local: group_id
- type: many
- foreign: user_id
- foreignType: many
- foreignAlias: Groups
- refClass: GroupUser
- actAs:
- SoftDelete:
- name: "deleted"
- Timestampable:
- created:
- name: "created"
- updated:
- name: "updated"
- GroupUser:
- columns:
- group_id:
- type: integer
- primary: true
- account_id:
- primary: true
- type: string(32)
- user_id:
- type: integer
- primary: true
- actAs:
- SoftDelete:
- name: "deleted"
- Timestampable:
- created:
- name: "created"
- updated:
- name: "updated"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement