mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-13 06:08:20 +00:00
fix sql
This commit is contained in:
parent
08ae13b877
commit
542f81d4f1
|
@ -1,6 +1,6 @@
|
||||||
DO $$
|
DO $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'migrations must be managed using lemmy_server instead of diesel CLI';
|
RAISE 'migrations must be managed using lemmy_server instead of diesel CLI';
|
||||||
END
|
END
|
||||||
$$;
|
$$;
|
||||||
|
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
drop table previously_run_sql;
|
DROP TABLE previously_run_sql;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
drop schema if exists r cascade;
|
DROP SCHEMA IF EXISTS r CASCADE;
|
||||||
-- `content` can't be used as primary key because of size limit
|
|
||||||
create table previously_run_sql (id boolean primary key, content text);
|
CREATE TABLE previously_run_sql (
|
||||||
insert into previously_run_sql (id, content) values (true, '');
|
-- For compatibility with Diesel
|
||||||
|
id boolean PRIMARY KEY,
|
||||||
|
-- Too big to be used as primary key
|
||||||
|
content text NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO previously_run_sql (id, content)
|
||||||
|
VALUES (TRUE, '');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue