
db.db.subscriptions.changelog-1.0.0.xml Maven / Gradle / Ivy
ALTER TABLE subscriptions OWNER TO ${db.liquibase_user};
GRANT ALL ON TABLE subscriptions TO ${db.liquibase_user};
GRANT SELECT, INSERT, UPDATE ON TABLE subscriptions TO ${db.server_users_group};
GRANT SELECT, DELETE ON TABLE subscriptions TO ${db.server_permanent_delete_users_group};
CREATE INDEX subscription_id_index ON subscriptions USING btree (subscription_id);
CREATE INDEX subscription_index ON patients USING gin (patient);
CREATE INDEX subscription_id_version_index ON subscriptions USING btree (subscription_id, version);
SELECT subscription_id, version, subscription
FROM (
SELECT DISTINCT ON (subscription_id) subscription_id, version, deleted, subscription
FROM subscriptions ORDER BY subscription_id, version DESC
) AS current_s
WHERE deleted IS NULL
ALTER TABLE current_subscriptions OWNER TO ${db.liquibase_user};
GRANT ALL ON TABLE current_subscriptions TO ${db.liquibase_user};
GRANT SELECT ON TABLE current_subscriptions TO ${db.server_users_group};
© 2015 - 2025 Weber Informatics LLC | Privacy Policy