Use decimal instead of float in this situation:
sale_price_eur:
type: decimal(18)
scale: 4
Showing posts with label schema. Show all posts
Showing posts with label schema. Show all posts
Friday, June 8, 2012
Friday, October 29, 2010
SQLSTATE[HY000]: General error: 1005 Can't create table
Let's see a very simple CORRECT relation and reasons why it can throw SQLSTATE[HY000]: General error...
relations: User: foreignAlias: Phonenumbers local: user_id foreign: id type: one foreignType: many
- Did you forget to define the user_id field in the Phonenumber table?
- Did you check the type of the user_id field and the Phonenumber table's id field? They must be exactly the same integer. If one of them is int(4) and the other is int(8), the building will fail.
Subscribe to:
Posts (Atom)