freechat/json-api/migrations/2021-05-17-221928_badges/up.sql
shockrah ecb55fa4fe * /badge/update/perms {perms} param is now {badge_perms}
This makes the parameter follow the naming convention of badge_*

* badges.id field now uses BIGINT's as intended

* Typo in sql where 'badges' was incorrectly set to 'perms' -_-
2021-06-07 22:42:26 -07:00

8 lines
307 B
SQL

CREATE TABLE IF NOT EXISTS `badges`(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(256) NOT NULL,
`color` INTEGER UNSIGNED NOT NULL DEFAULT 0xFFFFFFFF,
`permissions` INTEGER UNSIGNED, -- nullable because this isn't logically applicable to every badge
PRIMARY KEY(`id`)
);