我有以下模式来生成名为Account
的表/模型类:
Account:
actAs:
Timestampable: ~
SoftDelete:
name: deleted
type: boolean
columns:
branch_code:
type: integer
notnull: true
state_id:
type: integer
notnull: true
state_description:
type: string(20)
notnull: true
number:
type: integer
notnull: true
client_name:
type: string(100)
notnull: true
client_code:
type: integer
notnull: true
associated_do:
type: integer
notnull: true
loan_start_date:
type: datetime
notnull: true
first_missing_payment:
type: datetime
notnull: true
delay:
type: integer
notnull: true
balance:
type: float
notnull: true
limit:
type: float
notnull: true
lawyer_id:
type: integer
internal_user_id:
type: integer
solicitor_id:
type: integer
relations:
Lawyer:
local: lawyer_id
foreign: id
InternalUser:
local: internal_user_id
foreign: id
Solicitor:
local: solicitor_id
foreign: id
Branch:
local: branch_code
foreign: code
Evolutions:
type: many
class: Evolution
local: id
foreign: account_id
当我运行symfony任务重新加载数据库时,会发生以下错误(为了便于阅读而被截断):
SQLSTATE [42000]:语法错误或访问冲突:1064 SQL语法中有错误;查看与您的MySQL服务器版本对应的手册,以便在'limit FLOAT(18,2)NOT NULL,lawyer_id BIGINT,...附近使用正确的语法。)ENGINE = INNODB
答案 0 :(得分:1)
我试图声明名为limit
的列,这是一个SQL保留关键字。