Files
Modrinth-plus/apps/labrinth/migrations/20250914190749_affiliate_codes.sql

10 lines
378 B
MySQL
Raw Normal View History

CREATE TABLE affiliate_codes (
id bigint PRIMARY KEY,
created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
created_by bigint NOT NULL REFERENCES users(id),
affiliate bigint NOT NULL REFERENCES users(id),
-- left nullable so we can explicitly set payouts if we need to,
-- and use a global default if unset
revenue_split float
);