MySQL no innodb on ForeignKeys or using InnoDB Mysql Adapter
Hi,
i troed to create an database without sql. But for References it is necessary to set the engine to innodb. Their was no way even I use the MySQLInnoDBAdapter. So I created a new and overrides the writeCreateTable. So all tables will be innodb. Not really the best choice. But for this moment their is no other way to use foreign key references.
Thanks
i troed to create an database without sql. But for References it is necessary to set the engine to innodb. Their was no way even I use the MySQLInnoDBAdapter. So I created a new and overrides the writeCreateTable. So all tables will be innodb. Not really the best choice. But for this moment their is no other way to use foreign key references.
Thanks
override def writeCreateTable[T](t: Table[T], sw: StatementWriter, schema: Schema) = {
sw.write("create table ")
sw.write(quoteName(t.prefixedName))
sw.write(" (\n");
sw.writeIndented {
sw.writeLinesWithSeparator(
t.posoMetaData.fieldsMetaData.map(
fmd => writeColumnDeclaration(fmd, fmd.declaredAsPrimaryKeyInSchema, schema)
),
","
)
}
sw.write(")engine=innodb")
}
Leave a comment