With the help of ATTACH command I could seperate the table in different sqlite files.
But the generation foreign key SQL is not correct for SQLite with schema defined.
` class User(db.Entity):
table = ('main','user')
name = orm.Required(str)
car = orm.Set('Car')
class Car(db.Entity):
table = ('main','car')
name = orm.Required(str)
owner = orm.Required(User)`
Will got below error.
line 72, in wrap_dbapi_exceptions raise OperationalError(e) pony.orm.dbapiprovider.OperationalError: near ".": syntax error
As checked it's due to below wrong foreign key referfences. Correct should "main.user" instead.
CREATE TABLE "main"."car" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "name" TEXT NOT NULL, "owner" INTEGER NOT NULL REFERENCES "main"."user" ("id") ON DELETE CASCADE )
With the help of ATTACH command I could seperate the table in different sqlite files. But the generation foreign key SQL is not correct for SQLite with schema defined.
` class User(db.Entity): table = ('main','user') name = orm.Required(str) car = orm.Set('Car')
class Car(db.Entity): table = ('main','car') name = orm.Required(str) owner = orm.Required(User)`
Will got below error.
line 72, in wrap_dbapi_exceptions raise OperationalError(e) pony.orm.dbapiprovider.OperationalError: near ".": syntax error
As checked it's due to below wrong foreign key referfences. Correct should "main.user" instead.
CREATE TABLE "main"."car" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "name" TEXT NOT NULL, "owner" INTEGER NOT NULL REFERENCES "main"."user" ("id") ON DELETE CASCADE )