This repository has been archived by the owner on Apr 23, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 950
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #331 from mgilangjanuar/staging
Release v2.2.0
- Loading branch information
Showing
41 changed files
with
1,097 additions
and
992 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "teledrive", | ||
"version": "2.1.2", | ||
"version": "2.2.0", | ||
"repository": "[email protected]:mgilangjanuar/teledrive.git", | ||
"author": "M Gilang Januar <[email protected]>", | ||
"license": "MIT", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
# Keep environment variables out of version control | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
server/prisma/migrations/20220420012853_init/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; | ||
|
||
-- CreateTable | ||
CREATE TABLE "config" ( | ||
"created_at" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"id" UUID NOT NULL DEFAULT uuid_generate_v4(), | ||
"invitation_code" VARCHAR, | ||
"disable_signup" BOOLEAN NOT NULL DEFAULT false, | ||
"allow_server_storage_use" BOOLEAN NOT NULL DEFAULT false, | ||
|
||
CONSTRAINT "pk_af2ddc24176f1572cbdd4b45992" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "files" ( | ||
"created_at" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"id" UUID NOT NULL DEFAULT uuid_generate_v4(), | ||
"name" VARCHAR NOT NULL, | ||
"type" VARCHAR, | ||
"message_id" VARCHAR, | ||
"mime_type" VARCHAR, | ||
"size" BIGINT, | ||
"uploaded_at" TIMESTAMPTZ(6), | ||
"upload_progress" DOUBLE PRECISION, | ||
"user_id" UUID NOT NULL, | ||
"parent_id" UUID, | ||
"deleted_at" TIMESTAMPTZ(6), | ||
"sharing_options" VARCHAR[], | ||
"signed_key" VARCHAR, | ||
"file_id" VARCHAR, | ||
"link_id" UUID, | ||
"forward_info" VARCHAR, | ||
|
||
CONSTRAINT "PK_6c16b9093a142e0e7613b04a3d9" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "rate_limits" ( | ||
"key" VARCHAR(255) NOT NULL, | ||
"points" INTEGER NOT NULL DEFAULT 0, | ||
"expire" BIGINT, | ||
|
||
CONSTRAINT "rate_limits_pkey" PRIMARY KEY ("key") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "usages" ( | ||
"created_at" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"key" VARCHAR NOT NULL, | ||
"usage" BIGINT NOT NULL, | ||
"expire" TIMESTAMPTZ(6) NOT NULL, | ||
|
||
CONSTRAINT "PK_7d8e95b6dd4c0e87cad4972da13" PRIMARY KEY ("key") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "users" ( | ||
"created_at" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"id" UUID NOT NULL DEFAULT uuid_generate_v4(), | ||
"username" VARCHAR NOT NULL, | ||
"name" VARCHAR, | ||
"email" VARCHAR, | ||
"tg_id" VARCHAR, | ||
"plan" VARCHAR, | ||
"settings" JSONB, | ||
"role" VARCHAR, | ||
|
||
CONSTRAINT "PK_a3ffb1c0c8416b9fc6f907b7433" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "waitings" ( | ||
"created_at" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"id" UUID NOT NULL DEFAULT uuid_generate_v4(), | ||
"email" VARCHAR NOT NULL, | ||
|
||
CONSTRAINT "PK_f0cfe98441cf0fb92db66ae71c4" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "files_link_id_idx" ON "files"("link_id"); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "files_message_id_idx" ON "files"("message_id"); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "files_parent_id_idx" ON "files"("parent_id"); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "files_user_id_idx" ON "files"("user_id"); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "tg_id" ON "users"("tg_id"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "files" ADD CONSTRAINT "files_links_fkey" FOREIGN KEY ("link_id") REFERENCES "files"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "files" ADD CONSTRAINT "files_files_fkey" FOREIGN KEY ("parent_id") REFERENCES "files"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "files" ADD CONSTRAINT "files_users_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Please do not edit this file manually | ||
# It should be added in your version-control system (i.e. Git) | ||
provider = "postgresql" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
generator client { | ||
provider = "prisma-client-js" | ||
} | ||
|
||
datasource db { | ||
provider = "postgresql" | ||
url = env("DATABASE_URL") | ||
} | ||
|
||
/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by the Prisma Client. | ||
model config { | ||
created_at DateTime @default(now()) @db.Timestamptz(6) | ||
updated_at DateTime @default(now()) @db.Timestamptz(6) | ||
id String @id(map: "pk_af2ddc24176f1572cbdd4b45992") @default(dbgenerated("uuid_generate_v4()")) @db.Uuid | ||
invitation_code String? @db.VarChar | ||
disable_signup Boolean @default(false) | ||
allow_server_storage_use Boolean @default(false) | ||
} | ||
|
||
model files { | ||
created_at DateTime @default(now()) @db.Timestamptz(6) | ||
updated_at DateTime @default(now()) @db.Timestamptz(6) | ||
id String @id(map: "PK_6c16b9093a142e0e7613b04a3d9") @default(dbgenerated("uuid_generate_v4()")) @db.Uuid | ||
name String @db.VarChar | ||
type String? @db.VarChar | ||
message_id String? @db.VarChar | ||
mime_type String? @db.VarChar | ||
size BigInt? | ||
uploaded_at DateTime? @db.Timestamptz(6) | ||
upload_progress Float? | ||
user_id String @db.Uuid | ||
parent_id String? @db.Uuid | ||
deleted_at DateTime? @db.Timestamptz(6) | ||
sharing_options String[] @db.VarChar | ||
signed_key String? @db.VarChar | ||
file_id String? @db.VarChar | ||
link_id String? @db.Uuid | ||
forward_info String? @db.VarChar | ||
link files? @relation("filesTofiles_link_id", fields: [link_id], references: [id], onDelete: Cascade, map: "files_links_fkey") | ||
parent files? @relation("filesTofiles_parent_id", fields: [parent_id], references: [id], onDelete: Cascade, map: "files_files_fkey") | ||
users users @relation(fields: [user_id], references: [id], onDelete: Cascade, map: "files_users_fkey") | ||
links files[] @relation("filesTofiles_link_id") | ||
parents files[] @relation("filesTofiles_parent_id") | ||
@@index([link_id]) | ||
@@index([message_id]) | ||
@@index([parent_id]) | ||
@@index([user_id]) | ||
} | ||
|
||
model rate_limits { | ||
key String @id @db.VarChar(255) | ||
points Int @default(0) | ||
expire BigInt? | ||
} | ||
|
||
model usages { | ||
created_at DateTime @default(now()) @db.Timestamptz(6) | ||
updated_at DateTime @default(now()) @db.Timestamptz(6) | ||
key String @id(map: "PK_7d8e95b6dd4c0e87cad4972da13") @db.VarChar | ||
usage BigInt | ||
expire DateTime @db.Timestamptz(6) | ||
} | ||
|
||
model users { | ||
created_at DateTime @default(now()) @db.Timestamptz(6) | ||
updated_at DateTime @default(now()) @db.Timestamptz(6) | ||
id String @id(map: "PK_a3ffb1c0c8416b9fc6f907b7433") @default(dbgenerated("uuid_generate_v4()")) @db.Uuid | ||
username String @db.VarChar | ||
name String? @db.VarChar | ||
email String? @db.VarChar | ||
tg_id String? @db.VarChar | ||
plan String? @db.VarChar | ||
settings Json? | ||
role String? @db.VarChar | ||
files files[] | ||
@@index([tg_id], map: "tg_id") | ||
} | ||
|
||
model waitings { | ||
created_at DateTime @default(now()) @db.Timestamptz(6) | ||
updated_at DateTime @default(now()) @db.Timestamptz(6) | ||
id String @id(map: "PK_f0cfe98441cf0fb92db66ae71c4") @default(dbgenerated("uuid_generate_v4()")) @db.Uuid | ||
email String @db.VarChar | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.