
db.db.organizations.changelog-1.0.0.xml Maven / Gradle / Ivy
ALTER TABLE organizations OWNER TO ${db.liquibase_user};
GRANT ALL ON TABLE organizations TO ${db.liquibase_user};
GRANT SELECT, INSERT, UPDATE ON TABLE organizations TO ${db.server_users_group};
GRANT SELECT, DELETE ON TABLE organizations TO ${db.server_permanent_delete_users_group};
CREATE INDEX organization_id_index ON organizations USING btree (organization_id);
CREATE INDEX organization_index ON organizations USING gin (organization);
CREATE INDEX organization_id_version_index ON organizations USING btree (organization_id, version)
SELECT organization_id, version, organization
FROM (
SELECT DISTINCT ON (organization_id) organization_id, version, deleted, organization
FROM organizations ORDER BY organization_id, version DESC
) AS current_o
WHERE deleted IS NULL
ALTER TABLE current_organizations OWNER TO ${db.liquibase_user};
GRANT ALL ON TABLE current_organizations TO ${db.liquibase_user};
GRANT SELECT ON TABLE current_organizations TO ${db.server_users_group};
© 2015 - 2025 Weber Informatics LLC | Privacy Policy