You've already forked AstralRinth
forked from didirus/AstralRinth
Hard caps on creating projects/orgs/collections (#4430)
* implement backend limits on project creation * implement collection, org creation hard caps * Fix limit api * Fix clippy * Fix limits * Update sqlx queries * Address PR comments on user limit structure * sqlx prepare and clippy * fix test maybe
This commit is contained in:
9
apps/labrinth/migrations/20250927120742_user_limits.sql
Normal file
9
apps/labrinth/migrations/20250927120742_user_limits.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
CREATE TABLE user_limits (
|
||||
-- if NULL, this is a global default
|
||||
user_id BIGINT REFERENCES users(id),
|
||||
projects INTEGER NOT NULL,
|
||||
organizations INTEGER NOT NULL,
|
||||
collections INTEGER NOT NULL
|
||||
);
|
||||
INSERT INTO user_limits (user_id, projects, organizations, collections)
|
||||
VALUES (NULL, 256, 16, 32);
|
||||
Reference in New Issue
Block a user