lang-database 13.0.0 → 13.1.1

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.
package/migration.dump ADDED
@@ -0,0 +1,64 @@
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
+
@@ -0,0 +1,8 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - A unique constraint covering the columns `[purchaseToken]` on the table `purchases` will be added. If there are existing duplicate values, this will fail.
5
+
6
+ */
7
+ -- CreateIndex
8
+ CREATE UNIQUE INDEX "purchases_purchaseToken_key" ON "purchases"("purchaseToken");
@@ -0,0 +1,2 @@
1
+ -- AlterEnum
2
+ ALTER TYPE "PurchaseState" ADD VALUE 'CANCELED';
package/package.json CHANGED
@@ -1,17 +1,14 @@
1
1
  {
2
2
  "name": "lang-database",
3
- "version": "13.0.0",
3
+ "version": "13.1.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "scripts": {
8
8
  "create-migration": "npx prisma migrate dev --create-only",
9
+ "migrate": "npx prisma migrate deploy",
9
10
  "generate": "npx prisma generate",
10
- "push-dev-dbs": "npm run push-dev-db && npm run push-local-db && npm run push-test-db",
11
- "push-prod-db": "copy .env-prod .env && prisma db push --skip-generate",
12
- "push-dev-db": "copy .env-dev .env && prisma db push --skip-generate",
13
- "push-local-db": "copy .env-local .env && prisma db push --skip-generate",
14
- "push-test-db": "copy .env-test .env && prisma db push --skip-generate",
11
+ "push": "prisma db push --skip-generate",
15
12
  "test": "echo \"Error: no test specified\" && exit 1",
16
13
  "postinstall": "npm run generate"
17
14
  },
package/schema.prisma CHANGED
@@ -190,13 +190,14 @@ enum PurchaseState {
190
190
  COMPLETED
191
191
  REFUNDED
192
192
  FAILED
193
+ CANCELED
193
194
  }
194
195
 
195
196
  model Purchase {
196
197
  id String @id @default(cuid())
197
198
  user User @relation(fields: [userId], references: [id])
198
199
  userId String
199
- purchaseToken String
200
+ purchaseToken String @unique
200
201
  sku String
201
202
  state PurchaseState
202
203
  acknowledged Boolean