mirror of
https://github.com/ankitects/anki.git
synced 2025-11-19 11:07:12 -05:00
12 lines
No EOL
250 B
SQL
12 lines
No EOL
250 B
SQL
DROP TABLE IF EXISTS sort_order;
|
|
CREATE TEMPORARY TABLE sort_order (
|
|
pos integer PRIMARY KEY,
|
|
ntid integer NOT NULL,
|
|
ord integer NOT NULL,
|
|
UNIQUE(ntid, ord)
|
|
);
|
|
INSERT INTO sort_order (ntid, ord)
|
|
SELECT ntid,
|
|
ord
|
|
FROM templates
|
|
ORDER BY name |