
jbe@574: BEGIN;
jbe@574: 
jbe@574: CREATE OR REPLACE VIEW "liquid_feedback_version" AS
jbe@574:   SELECT * FROM (VALUES ('4.0.1', 4, 0, 1))
jbe@574:   AS "subquery"("string", "major", "minor", "revision");
jbe@574: 
jbe@574: CREATE OR REPLACE VIEW "expired_token" AS
jbe@574:   SELECT * FROM "token" WHERE now() > "expiry" AND NOT (
jbe@574:     "token_type" = 'authorization' AND "used" AND EXISTS (
jbe@574:       SELECT NULL FROM "token" AS "other"
jbe@574:       WHERE "other"."authorization_token_id" = "token"."id" ) );
jbe@574: 
jbe@575: ALTER TABLE "system_application" RENAME COLUMN "discovery_baseurl" TO "base_url";
jbe@575: ALTER TABLE "system_application" ADD COLUMN "manifest_url" TEXT;
jbe@575: 
jbe@575: COMMENT ON COLUMN "system_application"."base_url"     IS 'Base URL for users; NULL for hidden application';
jbe@575: COMMENT ON COLUMN "system_application"."manifest_url" IS 'URL referring to a manifest that can be used for application (type/version) discovery; NULL for hidden application';
jbe@575: 
jbe@574: COMMIT;




