mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-29 00:48:52 -06:00
Use OR IGNORE when sqlite
This commit is contained in:
@@ -187,7 +187,10 @@ class AppES extends BaseES {
|
||||
const subdomain = await entity.get('subdomain');
|
||||
const user = Context.get('user');
|
||||
let subdomain_res = await this.db.write(
|
||||
`INSERT IGNORE INTO subdomains
|
||||
`INSERT ${this.db.case({
|
||||
mysql: 'IGNORE',
|
||||
sqlite: 'OR IGNORE',
|
||||
})} INTO subdomains
|
||||
(subdomain, user_id, root_dir_id, uuid) VALUES
|
||||
( ?, ?, ?, ?)`,
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user