-
Notifications
You must be signed in to change notification settings - Fork 0
Postgres Cheat Sheet
Brian Jubelirer edited this page Mar 13, 2023
·
1 revision
BEGIN TRANSACTION;
DELETE from smart.permits where source_id > 263;
DELETE from smart_private.users_sources where source_id > 263;
DELETE from smart.sources where id > 263;
COMMIT;
moviegen will run if moviegen is true AND moviegen_retry < 3. moviegen defaults to true for all new ingests, and is set to false only when movie generation succeeds (guaranteed to have image_url set). As a result, the following will usually suffice.
UPDATE smart.permits SET moviegen_retry=0 where <condition>
the moviegen service sleeps when no new movies are needed. It will take a few seconds for it to recheck once running the query.
SELECT smart_private.register_user('my_username', 'my_password');
INSERT INTO users_sources('user_id','source_id') VALUES(999,999);