mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 23:42:23 -04:00
sql formatting
This commit is contained in:
parent
f7f509c70d
commit
97b4c2124c
3 changed files with 19 additions and 23 deletions
|
@ -1,4 +1,3 @@
|
||||||
insert
|
INSERT
|
||||||
or replace into tags (id, name, usn, config)
|
OR REPLACE INTO tags (id, name, usn, config)
|
||||||
values
|
VALUES (?, ?, ?, ?)
|
||||||
(?, ?, ?, ?)
|
|
|
@ -1,13 +1,10 @@
|
||||||
select
|
SELECT CASE
|
||||||
case
|
WHEN ?1 IN (
|
||||||
when ?1 in (
|
SELECT id
|
||||||
select
|
FROM tags
|
||||||
id
|
) THEN (
|
||||||
from tags
|
SELECT max(id) + 1
|
||||||
) then (
|
FROM tags
|
||||||
select
|
|
||||||
max(id) + 1
|
|
||||||
from tags
|
|
||||||
)
|
)
|
||||||
else ?1
|
ELSE ?1
|
||||||
end;
|
END;
|
|
@ -1,7 +1,7 @@
|
||||||
drop table tags;
|
DROP TABLE tags;
|
||||||
create table tags (
|
CREATE TABLE tags (
|
||||||
id integer primary key not null,
|
id integer PRIMARY KEY NOT NULL,
|
||||||
name text not null collate unicase,
|
name text NOT NULL COLLATE unicase,
|
||||||
usn integer not null,
|
usn integer NOT NULL,
|
||||||
config blob not null
|
config blob NOT NULL
|
||||||
);
|
);
|
Loading…
Reference in a new issue