-- Novalon管理系统权限授予脚本
-- 版本: V4
-- 描述: 为novalon用户授予所有表的访问权限

-- 授予所有表的SELECT, INSERT, UPDATE, DELETE权限
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO novalon;

-- 授予所有序列的使用权限
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO novalon;

-- 设置默认权限，使未来创建的表自动授予novalon用户权限
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO novalon;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT USAGE, SELECT ON SEQUENCES TO novalon;
