mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-21 23:20:24 +00:00
squash database migrations
This commit is contained in:
parent
0e6113eef6
commit
35b0566c0e
12 changed files with 18 additions and 55 deletions
|
@ -1,6 +0,0 @@
|
|||
BEGIN;
|
||||
--
|
||||
-- Create model User
|
||||
--
|
||||
CREATE TABLE `users` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `username` varchar(255) NOT NULL UNIQUE, `password` varchar(255) NULL, `public_key` longtext NULL, `home_dir` varchar(255) NOT NULL, `uid` integer NOT NULL, `gid` integer NOT NULL, `max_sessions` integer NOT NULL, `quota_size` bigint NOT NULL, `quota_files` integer NOT NULL, `permissions` longtext NOT NULL, `used_quota_size` bigint NOT NULL, `used_quota_files` integer NOT NULL, `last_quota_scan` bigint NOT NULL, `upload_bandwidth` integer NOT NULL, `download_bandwidth` integer NOT NULL);
|
||||
COMMIT;
|
|
@ -1,6 +0,0 @@
|
|||
BEGIN;
|
||||
--
|
||||
-- Rename field last_quota_scan on user to last_quota_update
|
||||
--
|
||||
ALTER TABLE `users` CHANGE `last_quota_scan` `last_quota_update` bigint NOT NULL;
|
||||
COMMIT;
|
|
@ -1,6 +0,0 @@
|
|||
BEGIN;
|
||||
--
|
||||
-- Rename field public_key on user to public_keys
|
||||
--
|
||||
ALTER TABLE `users` CHANGE `public_key` `public_keys` longtext NULL;
|
||||
COMMIT;
|
6
sql/mysql/20190828.sql
Normal file
6
sql/mysql/20190828.sql
Normal file
|
@ -0,0 +1,6 @@
|
|||
BEGIN;
|
||||
--
|
||||
-- Create model User
|
||||
--
|
||||
CREATE TABLE `users` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `username` varchar(255) NOT NULL UNIQUE, `password` varchar(255) NULL, `public_keys` longtext NULL, `home_dir` varchar(255) NOT NULL, `uid` integer NOT NULL, `gid` integer NOT NULL, `max_sessions` integer NOT NULL, `quota_size` bigint NOT NULL, `quota_files` integer NOT NULL, `permissions` longtext NOT NULL, `used_quota_size` bigint NOT NULL, `used_quota_files` integer NOT NULL, `last_quota_update` bigint NOT NULL, `upload_bandwidth` integer NOT NULL, `download_bandwidth` integer NOT NULL);
|
||||
COMMIT;
|
|
@ -1,7 +0,0 @@
|
|||
BEGIN;
|
||||
--
|
||||
-- Create model User
|
||||
--
|
||||
CREATE TABLE "users" ("id" serial NOT NULL PRIMARY KEY, "username" varchar(255) NOT NULL UNIQUE, "password" varchar(255) NULL, "public_key" text NULL, "home_dir" varchar(255) NOT NULL, "uid" integer NOT NULL, "gid" integer NOT NULL, "max_sessions" integer NOT NULL, "quota_size" bigint NOT NULL, "quota_files" integer NOT NULL, "permissions" text NOT NULL, "used_quota_size" bigint NOT NULL, "used_quota_files" integer NOT NULL, "last_quota_scan" bigint NOT NULL, "upload_bandwidth" integer NOT NULL, "download_bandwidth" integer NOT NULL);
|
||||
COMMIT;
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
BEGIN;
|
||||
--
|
||||
-- Rename field last_quota_scan on user to last_quota_update
|
||||
--
|
||||
ALTER TABLE "users" RENAME COLUMN "last_quota_scan" TO "last_quota_update";
|
||||
COMMIT;
|
|
@ -1,6 +0,0 @@
|
|||
BEGIN;
|
||||
--
|
||||
-- Rename field public_key on user to public_keys
|
||||
--
|
||||
ALTER TABLE "users" RENAME COLUMN "public_key" TO "public_keys";
|
||||
COMMIT;
|
6
sql/pgsql/20190828.sql
Normal file
6
sql/pgsql/20190828.sql
Normal file
|
@ -0,0 +1,6 @@
|
|||
BEGIN;
|
||||
--
|
||||
-- Create model User
|
||||
--
|
||||
CREATE TABLE "users" ("id" serial NOT NULL PRIMARY KEY, "username" varchar(255) NOT NULL UNIQUE, "password" varchar(255) NULL, "public_keys" text NULL, "home_dir" varchar(255) NOT NULL, "uid" integer NOT NULL, "gid" integer NOT NULL, "max_sessions" integer NOT NULL, "quota_size" bigint NOT NULL, "quota_files" integer NOT NULL, "permissions" text NOT NULL, "used_quota_size" bigint NOT NULL, "used_quota_files" integer NOT NULL, "last_quota_update" bigint NOT NULL, "upload_bandwidth" integer NOT NULL, "download_bandwidth" integer NOT NULL);
|
||||
COMMIT;
|
|
@ -1,6 +0,0 @@
|
|||
BEGIN;
|
||||
--
|
||||
-- Create model User
|
||||
--
|
||||
CREATE TABLE "users" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "username" varchar(255) NOT NULL UNIQUE, "password" varchar(255) NULL, "public_key" text NULL, "home_dir" varchar(255) NOT NULL, "uid" integer NOT NULL, "gid" integer NOT NULL, "max_sessions" integer NOT NULL, "quota_size" bigint NOT NULL, "quota_files" integer NOT NULL, "permissions" text NOT NULL, "used_quota_size" bigint NOT NULL, "used_quota_files" integer NOT NULL, "last_quota_scan" bigint NOT NULL, "upload_bandwidth" integer NOT NULL, "download_bandwidth" integer NOT NULL);
|
||||
COMMIT;
|
|
@ -1,6 +0,0 @@
|
|||
BEGIN;
|
||||
--
|
||||
-- Rename field last_quota_scan on user to last_quota_update
|
||||
--
|
||||
ALTER TABLE "users" RENAME COLUMN "last_quota_scan" TO "last_quota_update";
|
||||
COMMIT;
|
|
@ -1,6 +0,0 @@
|
|||
BEGIN;
|
||||
--
|
||||
-- Rename field public_key on user to public_keys
|
||||
--
|
||||
ALTER TABLE "users" RENAME COLUMN "public_key" TO "public_keys";
|
||||
COMMIT;
|
6
sql/sqlite/20190828.sql
Normal file
6
sql/sqlite/20190828.sql
Normal file
|
@ -0,0 +1,6 @@
|
|||
BEGIN;
|
||||
--
|
||||
-- Create model User
|
||||
--
|
||||
CREATE TABLE "users" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "username" varchar(255) NOT NULL UNIQUE, "password" varchar(255) NULL, "public_keys" text NULL, "home_dir" varchar(255) NOT NULL, "uid" integer NOT NULL, "gid" integer NOT NULL, "max_sessions" integer NOT NULL, "quota_size" bigint NOT NULL, "quota_files" integer NOT NULL, "permissions" text NOT NULL, "used_quota_size" bigint NOT NULL, "used_quota_files" integer NOT NULL, "last_quota_update" bigint NOT NULL, "upload_bandwidth" integer NOT NULL, "download_bandwidth" integer NOT NULL);
|
||||
COMMIT;
|
Loading…
Reference in a new issue