diff --git a/prisma/migrations/20240706074316_size_key/migration.sql b/prisma/migrations/20240706074316_size_key/migration.sql new file mode 100644 index 0000000..18e219c --- /dev/null +++ b/prisma/migrations/20240706074316_size_key/migration.sql @@ -0,0 +1,8 @@ +/* + Warnings: + + - Added the required column `size` to the `Upload` table without a default value. This is not possible if the table is not empty. + +*/ +-- AlterTable +ALTER TABLE `Upload` ADD COLUMN `size` BIGINT NOT NULL; diff --git a/prisma/migrations/20240706074424_am_i_crazy/migration.sql b/prisma/migrations/20240706074424_am_i_crazy/migration.sql new file mode 100644 index 0000000..1f42d1a --- /dev/null +++ b/prisma/migrations/20240706074424_am_i_crazy/migration.sql @@ -0,0 +1,8 @@ +/* + Warnings: + + - You are about to alter the column `size` on the `Upload` table. The data in that column could be lost. The data in that column will be cast from `BigInt` to `Int`. + +*/ +-- AlterTable +ALTER TABLE `Upload` MODIFY `size` INTEGER NOT NULL; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 33e2c61..19ef386 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -53,6 +53,7 @@ model Upload { fileName String @db.LongText internalName String @db.LongText + size Int public Boolean @default(true) uploaded DateTime @default(now()) } diff --git a/src/lib/components/File.svelte b/src/lib/components/File.svelte index 8fc06dc..5200eff 100644 --- a/src/lib/components/File.svelte +++ b/src/lib/components/File.svelte @@ -35,9 +35,13 @@ >
{file.name}
+{file.name}
{/if}+ {upload.fileName} +
+ +{$pageIndex + 1} / {Math.ceil(data.totalUploads / 15)}
+ +