sftpgo/sql/mysql/20191112.sql
Nicola Murino c2ff50c917 dataprovider: add support for user status and expiration
an user can now be disabled or expired.

If you are using an SQL database as dataprovider please remember to
execute the sql update script inside "sql" folder.

Fixes #57
2019-11-13 11:36:21 +01:00

17 lines
No EOL
525 B
PL/PgSQL

BEGIN;
--
-- Add field expiration_date to user
--
ALTER TABLE `users` ADD COLUMN `expiration_date` bigint DEFAULT 0 NOT NULL;
ALTER TABLE `users` ALTER COLUMN `expiration_date` DROP DEFAULT;
--
-- Add field last_login to user
--
ALTER TABLE `users` ADD COLUMN `last_login` bigint DEFAULT 0 NOT NULL;
ALTER TABLE `users` ALTER COLUMN `last_login` DROP DEFAULT;
--
-- Add field status to user
--
ALTER TABLE `users` ADD COLUMN `status` integer DEFAULT 1 NOT NULL;
ALTER TABLE `users` ALTER COLUMN `status` DROP DEFAULT;
COMMIT;