@@ -257,8 +257,11 @@ class SQLiteQueryGenerator extends MySqlQueryGenerator {
...
@@ -257,8 +257,11 @@ class SQLiteQueryGenerator extends MySqlQueryGenerator {
return{query,bind};
return{query,bind};
}
}
truncateTableQuery(tableName){
truncateTableQuery(tableName,options={}){
return`DELETE FROM ${this.quoteTable(tableName)}`;
return[
`DELETE FROM ${this.quoteTable(tableName)}`,
options.restartIdentity?`; DELETE FROM ${this.quoteTable('sqlite_sequence')} WHERE ${this.quoteIdentifier('name')} = ${Utils.addTicks(Utils.removeTicks(this.quoteTable(tableName),'`'),"'")};`:''