symfony1 - Can you generate relationships with Symfony (using Doctrine)? -
at moment, if following, generates schema.yml:
./symfony doctrine:build-schema
but doesn't generate relationships.
do have manually add schema.yml or there way generate them? , if have manually enter in, won't over-written next time doctrine:build-schema
(to refresh schema new tables, etc)?
here schema.yml:
companies: connection: doctrine tablename: companies columns: company_id: type: integer(4) fixed: false unsigned: false primary: true autoincrement: true company_name: type: string(100) fixed: false unsigned: false primary: false notnull: true autoincrement: false company_logo: type: string(100) fixed: false unsigned: false primary: false notnull: true autoincrement: false company_date_added: type: timestamp(25) fixed: false unsigned: false primary: false notnull: true autoincrement: false credentials: connection: doctrine tablename: credentials columns: credential_id: type: integer(4) fixed: false unsigned: false primary: true autoincrement: true credential_name: type: string(100) fixed: false unsigned: false primary: false notnull: true autoincrement: false company_id: type: integer(4) fixed: false unsigned: false primary: false notnull: true autoincrement: false credential_date_added: type: timestamp(25) fixed: false unsigned: false primary: false default: '0000-00-00 00:00:00' notnull: true autoincrement: false groups: connection: doctrine tablename: groups columns: group_id: type: integer(4) fixed: false unsigned: false primary: true autoincrement: true group_name: type: string(100) fixed: false unsigned: false primary: false notnull: true autoincrement: false company_id: type: integer(4) fixed: false unsigned: false primary: false notnull: true autoincrement: false group_date_added: type: timestamp(25) fixed: false unsigned: false primary: false default: '0000-00-00 00:00:00' notnull: true autoincrement: false groupscredentials: connection: doctrine tablename: groups_credentials columns: group_credential_id: type: integer(4) fixed: false unsigned: false primary: true autoincrement: true group_id: type: integer(4) fixed: false unsigned: false primary: false notnull: true autoincrement: false credential_id: type: integer(4) fixed: false unsigned: false primary: false notnull: true autoincrement: false group_credential_date_added: type: integer(4) fixed: false unsigned: false primary: false notnull: true autoincrement: false users: connection: doctrine tablename: users columns: user_id: type: integer(4) fixed: false unsigned: false primary: true autoincrement: true user_username: type: string(100) fixed: false unsigned: false primary: false notnull: true autoincrement: false user_password: type: string(100) fixed: false unsigned: false primary: false notnull: true autoincrement: false user_email: type: string(100) fixed: false unsigned: false primary: false notnull: true autoincrement: false company_id: type: integer(4) fixed: false unsigned: false primary: false notnull: true autoincrement: false user_date_added: type: timestamp(25) fixed: false unsigned: false primary: false notnull: true autoincrement: false userscredentials: connection: doctrine tablename: users_credentials columns: user_credential_id: type: integer(4) fixed: false unsigned: false primary: true autoincrement: true user_id: type: integer(4) fixed: false unsigned: false primary: false notnull: true autoincrement: false credential_id: type: integer(4) fixed: false unsigned: false primary: false notnull: true autoincrement: false user_credential_date_added: type: timestamp(25) fixed: false unsigned: false primary: false default: '0000-00-00 00:00:00' notnull: true autoincrement: false
i ended fixing issue.
the relationships weren't setup in mysql db - stupid mistake on part.
Comments
Post a Comment