Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [SYMFONY][DOCTRINE] General error: 1005 Can't create table 'jobeet.#sql-510_1d' ( errno: 150)
diasek7
post 10.02.2011, 13:59:08
Post #1





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 9.02.2011

Ostrzeżenie: (0%)
-----


witam, udalo mi sie zrobic jobeeta i teraz probuje cos z pluginami. mam problem z tym http://www.symfony-project.org/plugins/sfDoctrineApplyPlugin

schema.yml wyglada tak:

  1. JobeetCategory:
  2. actAs:
  3. Timestampable: ~
  4. I18n:
  5. fields: [name]
  6. actAs:
  7. Sluggable: { fields: [name], uniqueBy: [lang, name] }
  8. columns:
  9. name: { type: string(255), notnull: true }
  10.  
  11. JobeetJob:
  12. actAs: { Timestampable: ~ }
  13. columns:
  14. category_id: { type: integer, notnull: true }
  15. type: { type: string(255) }
  16. company: { type: string(255), notnull: true }
  17. logo: { type: string(255) }
  18. url: { type: string(255) }
  19. position: { type: string(255), notnull: true }
  20. location: { type: string(255), notnull: true }
  21. description: { type: string(4000), notnull: true }
  22. how_to_apply: { type: string(4000), notnull: true }
  23. token: { type: string(255), notnull: true, unique: true }
  24. is_public: { type: boolean, notnull: true, default: 1 }
  25. is_activated: { type: boolean, notnull: true, default: 0 }
  26. email: { type: string(255), notnull: true }
  27. expires_at: { type: timestamp, notnull: true }
  28. relations:
  29. JobeetCategory: { onDelete: CASCADE, local: category_id, foreign: id, foreignAlias: JobeetJobs }
  30.  
  31. JobeetAffiliate:
  32. actAs: { Timestampable: ~ }
  33. columns:
  34. url: { type: string(255), notnull: true }
  35. email: { type: string(255), notnull: true, unique: true }
  36. token: { type: string(255), notnull: true }
  37. is_active: { type: boolean, notnull: true, default: 0 }
  38. relations:
  39. JobeetCategories:
  40. class: JobeetCategory
  41. refClass: JobeetCategoryAffiliate
  42. local: affiliate_id
  43. foreign: category_id
  44. foreignAlias: JobeetAffiliates
  45.  
  46. JobeetCategoryAffiliate:
  47. columns:
  48. category_id: { type: integer, primary: true }
  49. affiliate_id: { type: integer, primary: true }
  50. relations:
  51. JobeetCategory: { onDelete: CASCADE, local: category_id, foreign: id }
  52. JobeetAffiliate: { onDelete: CASCADE, local: affiliate_id, foreign: id }
  53.  
  54. sfGuardUserProfile:
  55. tableName: sf_guard_user_profile
  56. columns:
  57. id:
  58. type: integer(4)
  59. primary: true
  60. autoincrement: true
  61. user_id:
  62. type: integer(4)
  63. notnull: true
  64. email:
  65. type: string(80)
  66. fullname:
  67. type: string(80)
  68. validate:
  69. type: string(17)
  70.  
  71. relations:
  72. User:
  73. class: sfGuardUser
  74. foreign: id
  75. local: user_id
  76. type: one
  77. onDelete: cascade
  78. foreignType: one
  79. foreignAlias: Profile


laduje mi sie to wszystko

php symfony doctrine:build --all --and-load --no-confirmation

i na koncu;

Kod
>> doctrine  generating sql for models
>> doctrine  Generated SQL successfully for models
>> doctrine  creating tables


  SQLSTATE[HY000]: General error: 1005 Can't create table 'jobeet.#sql-510_1d' (
errno: 150). Failing Query: "ALTER TABLE sf_guard_user_profile ADD CONSTRAINT sf
_guard_user_profile_user_id_sf_guard_user_id FOREIGN KEY (user_id) REFERENCES sf
_guard_user(id) ON DELETE CASCADE". Failing Query: ALTER TABLE sf_guard_user_pro
file ADD CONSTRAINT sf_guard_user_profile_user_id_sf_guard_user_id FOREIGN KEY (
user_id) REFERENCES sf_guard_user(id) ON DELETE CASCADE


nie bardzo rozumiem o co tutaj chodzi...

pozdrawiam
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 24.07.2025 - 16:36