lang-database 14.0.0 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `dailyUsageSec` on the `userStats` table. All the data in the column will be lost.
|
|
5
|
+
- You are about to drop the column `monthlyUsageSec` on the `userStats` table. All the data in the column will be lost.
|
|
6
|
+
- You are about to drop the column `weeklyUsageSec` on the `userStats` table. All the data in the column will be lost.
|
|
7
|
+
- Added the required column `thisMonthActiveDays` to the `userStats` table without a default value. This is not possible if the table is not empty.
|
|
8
|
+
- Added the required column `thisMonthActivitySec` to the `userStats` table without a default value. This is not possible if the table is not empty.
|
|
9
|
+
- Added the required column `thisWeekActiveDays` to the `userStats` table without a default value. This is not possible if the table is not empty.
|
|
10
|
+
- Added the required column `thisWeekActivitySec` to the `userStats` table without a default value. This is not possible if the table is not empty.
|
|
11
|
+
- Added the required column `todayActivitySec` to the `userStats` table without a default value. This is not possible if the table is not empty.
|
|
12
|
+
|
|
13
|
+
*/
|
|
14
|
+
-- AlterTable
|
|
15
|
+
ALTER TABLE "userStats" DROP COLUMN "dailyUsageSec",
|
|
16
|
+
DROP COLUMN "monthlyUsageSec",
|
|
17
|
+
DROP COLUMN "weeklyUsageSec",
|
|
18
|
+
ADD COLUMN "thisMonthActiveDays" INTEGER NOT NULL,
|
|
19
|
+
ADD COLUMN "thisMonthActivitySec" INTEGER NOT NULL,
|
|
20
|
+
ADD COLUMN "thisWeekActiveDays" INTEGER NOT NULL,
|
|
21
|
+
ADD COLUMN "thisWeekActivitySec" INTEGER NOT NULL,
|
|
22
|
+
ADD COLUMN "todayActivitySec" INTEGER NOT NULL;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lang-database",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"create
|
|
9
|
-
"migrate": "npx prisma migrate deploy",
|
|
8
|
+
"migrate:create": "npx prisma migrate dev --create-only",
|
|
9
|
+
"migrate:deploy": "npx prisma migrate deploy",
|
|
10
10
|
"generate": "npx prisma generate",
|
|
11
11
|
"push": "prisma db push --skip-generate",
|
|
12
12
|
"test": "echo \"Error: no test specified\" && exit 1",
|
package/schema.prisma
CHANGED
|
@@ -60,11 +60,13 @@ model UserStat {
|
|
|
60
60
|
user User @relation(fields: [userId], references: [id])
|
|
61
61
|
userId String
|
|
62
62
|
|
|
63
|
-
lastAnswerTimestamp
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
lastAnswerTimestamp DateTime
|
|
64
|
+
todayActivitySec Int
|
|
65
|
+
thisWeekActivitySec Int
|
|
66
|
+
thisWeekActiveDays Int
|
|
67
|
+
thisMonthActivitySec Int
|
|
68
|
+
thisMonthActiveDays Int
|
|
69
|
+
cardsDone Int
|
|
68
70
|
|
|
69
71
|
@@id([userId])
|
|
70
72
|
@@map("userStats")
|
package/migration.dump
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
--
|
|
2
|
-
-- PostgreSQL database dump
|
|
3
|
-
--
|
|
4
|
-
|
|
5
|
-
-- Dumped from database version 17.2
|
|
6
|
-
-- Dumped by pg_dump version 17.2
|
|
7
|
-
|
|
8
|
-
SET statement_timeout = 0;
|
|
9
|
-
SET lock_timeout = 0;
|
|
10
|
-
SET idle_in_transaction_session_timeout = 0;
|
|
11
|
-
SET transaction_timeout = 0;
|
|
12
|
-
SET client_encoding = 'UTF8';
|
|
13
|
-
SET standard_conforming_strings = on;
|
|
14
|
-
SELECT pg_catalog.set_config('search_path', '', false);
|
|
15
|
-
SET check_function_bodies = false;
|
|
16
|
-
SET xmloption = content;
|
|
17
|
-
SET client_min_messages = warning;
|
|
18
|
-
SET row_security = off;
|
|
19
|
-
|
|
20
|
-
SET default_tablespace = '';
|
|
21
|
-
|
|
22
|
-
SET default_table_access_method = heap;
|
|
23
|
-
|
|
24
|
-
--
|
|
25
|
-
-- Name: _prisma_migrations; Type: TABLE; Schema: public; Owner: postgres
|
|
26
|
-
--
|
|
27
|
-
|
|
28
|
-
CREATE TABLE public._prisma_migrations (
|
|
29
|
-
id character varying(36) NOT NULL,
|
|
30
|
-
checksum character varying(64) NOT NULL,
|
|
31
|
-
finished_at timestamp with time zone,
|
|
32
|
-
migration_name character varying(255) NOT NULL,
|
|
33
|
-
logs text,
|
|
34
|
-
rolled_back_at timestamp with time zone,
|
|
35
|
-
started_at timestamp with time zone DEFAULT now() NOT NULL,
|
|
36
|
-
applied_steps_count integer DEFAULT 0 NOT NULL
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
ALTER TABLE public._prisma_migrations OWNER TO postgres;
|
|
41
|
-
|
|
42
|
-
--
|
|
43
|
-
-- Data for Name: _prisma_migrations; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
44
|
-
--
|
|
45
|
-
|
|
46
|
-
COPY public._prisma_migrations (id, checksum, finished_at, migration_name, logs, rolled_back_at, started_at, applied_steps_count) FROM stdin;
|
|
47
|
-
3652124e-dce1-4770-999a-d04dff20fe9f b39a05144c141af535ebe7e2e6ffc5dd8d7c617ecedd049d0b6cc9ef20b7875e 2024-12-14 00:01:40.689448+01 20241205175825_init \N \N 2024-12-14 00:01:40.642657+01 1
|
|
48
|
-
ab846b6b-ee1b-4b3e-b1bb-31375fdbdc13 2f6dac4b7b4b8ace1f589a7c073a0003a0cd390ef7188cbd7657ec967da86f41 2024-12-14 00:01:40.698333+01 20241210212001_ \N \N 2024-12-14 00:01:40.689987+01 1
|
|
49
|
-
29f01ddb-11d8-4490-85c1-0cbcb950360c c40ba2f55a4e327af2e1904a26ae12d7823a1627eee8bcbbfbaa689ac8c00f07 2024-12-14 00:01:40.710179+01 20241213210059_new_purchase_table \N \N 2024-12-14 00:01:40.70724+01 1
|
|
50
|
-
\.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
--
|
|
54
|
-
-- Name: _prisma_migrations _prisma_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
55
|
-
--
|
|
56
|
-
|
|
57
|
-
ALTER TABLE ONLY public._prisma_migrations
|
|
58
|
-
ADD CONSTRAINT _prisma_migrations_pkey PRIMARY KEY (id);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
--
|
|
62
|
-
-- PostgreSQL database dump complete
|
|
63
|
-
--
|
|
64
|
-
|