@horizonwing/engine 0.0.0-stage → 0.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/README.md +32 -2
- package/drizzle/pg/schema.ts +100 -0
- package/drizzle/postgres/0000_smooth_princess_powerful.sql +34 -0
- package/drizzle/postgres/0001_colossal_morbius.sql +50 -0
- package/drizzle/postgres/README.md +23 -0
- package/drizzle/postgres/meta/0000_snapshot.json +244 -0
- package/drizzle/postgres/meta/0001_snapshot.json +545 -0
- package/drizzle/postgres/meta/_journal.json +20 -0
- package/drizzle/schema.ts +128 -0
- package/drizzle/sqlite/0000_cooing_jackpot.sql +34 -0
- package/drizzle/sqlite/0001_living_ben_urich.sql +49 -0
- package/drizzle/sqlite/meta/0000_snapshot.json +231 -0
- package/drizzle/sqlite/meta/0001_snapshot.json +554 -0
- package/drizzle/sqlite/meta/_journal.json +20 -0
- package/package.json +80 -4
- package/src/account-pages.tsx +152 -0
- package/src/auth.tsx +265 -0
- package/src/cache.ts +199 -0
- package/src/content.ts +448 -0
- package/src/db.ts +107 -0
- package/src/feeds.ts +376 -0
- package/src/guard.ts +126 -0
- package/src/html.ts +20 -0
- package/src/i18n.ts +304 -0
- package/src/index.ts +27 -0
- package/src/md.ts +278 -0
- package/src/media.ts +70 -0
- package/src/password.ts +59 -0
- package/src/platform.node.ts +98 -0
- package/src/platform.postgres.ts +61 -0
- package/src/platform.shared.ts +114 -0
- package/src/platform.ts +24 -0
- package/src/platform.workers.ts +94 -0
- package/src/ratelimit.ts +144 -0
- package/src/section.ts +123 -0
- package/src/sections/blog/index.tsx +93 -0
- package/src/sections/blog/schema.ts +12 -0
- package/src/sections/blog/views/pages.tsx +167 -0
- package/src/sections/docs/index.tsx +67 -0
- package/src/sections/docs/schema.ts +16 -0
- package/src/sections/docs/views/pages.tsx +181 -0
- package/src/sections/landing/index.tsx +42 -0
- package/src/sections/landing/views/pages.tsx +218 -0
- package/src/seo.ts +193 -0
- package/src/server.ts +122 -0
- package/src/services/content.ts +342 -0
- package/src/turnstile.ts +62 -0
- package/src/types.ts +192 -0
- package/src/views/error.tsx +36 -0
- package/src/views/index.tsx +13 -0
- package/src/views/layout.tsx +89 -0
- package/themes/warm/tokens.css +119 -0
- package/tsconfig.json +32 -0
package/README.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @horizonwing/engine
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
kit 建站引擎核心包:Hono 双入口(Workers / Node)组装、SWR 渲染缓存、内容引擎
|
|
4
|
+
(Markdown + frontmatter 校验 + checksum diff 同步)、Section 插件协议、SEO/feeds、
|
|
5
|
+
better-auth 账户体系、warm 主题 tokens。
|
|
6
|
+
|
|
7
|
+
## 子路径导出(exports map)
|
|
8
|
+
|
|
9
|
+
| 子路径 | 内容 |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `.` | 核心 facade:createApp / defineSection / buildHead / registerMessages / 类型 |
|
|
12
|
+
| `./platform` | 平台抽象(类型 + 内存 cache/kv/fs storage 共享件) |
|
|
13
|
+
| `./platform/node` | better-sqlite3 / node:fs adapter(仅 Node 入口用) |
|
|
14
|
+
| `./platform/workers` | D1 / Cache API / R2 adapter(仅 Workers 入口用) |
|
|
15
|
+
| `./platform/postgres` | PG/Hyperdrive 适配(P1 预留) |
|
|
16
|
+
| `./md` | Markdown 渲染(marked + sanitize + RENDERER_VERSION) |
|
|
17
|
+
| `./seo` | head 构造 + JSON-LD 构造器 |
|
|
18
|
+
| `./content` | 内容扫描/校验/同步 + frontmatter 基础 schema |
|
|
19
|
+
| `./section` | Section 协议 + registerSections |
|
|
20
|
+
| `./server` | createApp(唯一 app 组装) |
|
|
21
|
+
| `./cache` `./guard` `./feeds` `./i18n` `./auth` `./media` `./ratelimit` `./turnstile` `./password` `./db` `./html` `./types` | 引擎各能力件 |
|
|
22
|
+
| `./views` | 默认视图基建(Layout / ErrorPage / renderErrorPage) |
|
|
23
|
+
| `./sections/blog` `./sections/docs` `./sections/landing`(+/schema) | 官方三 section |
|
|
24
|
+
| `./drizzle/schema` | drizzle 表定义(content/redirects/kv + auth 四表,SQLite 与 PG 双方言) |
|
|
25
|
+
|
|
26
|
+
## 形态说明
|
|
27
|
+
|
|
28
|
+
- 运行时 TS 源码直出(exports 指向 `.ts/.tsx`,经 tsx / vitest / esbuild 类加载器消费);
|
|
29
|
+
`npm run build` = `tsc --noEmit` 类型构建。发布产物(tsc emit + d.ts)流程见根目录
|
|
30
|
+
`docs/product.md`。
|
|
31
|
+
- i18n:引擎不持有 paraglide 依赖,站点在 site.config.ts 里
|
|
32
|
+
`registerMessages(paraglide 编译产物)` 注入;未注册时 tr() 回退返回 key。
|
|
33
|
+
- 平台纪律:`./platform/node` 禁止被 Workers 侧代码静态导入(engine-conventions)。
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { integer, pgTable, text, timestamp, uniqueIndex, boolean, serial } from 'drizzle-orm/pg-core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* PG 方言镜像定义(总设计 §4 / P1 接口预留):
|
|
5
|
+
* 与 drizzle/schema.ts(SQLite)字段一一对应,M1 只交付 schema + migrations +
|
|
6
|
+
* platform 代码路径与文档(drizzle/postgres/README.md),不实测连接。
|
|
7
|
+
*
|
|
8
|
+
* 生成 migration:`npm run db:generate:pg`(drizzle-kit,纯静态产出,无需真实库)。
|
|
9
|
+
*/
|
|
10
|
+
export const content = pgTable(
|
|
11
|
+
'content',
|
|
12
|
+
{
|
|
13
|
+
id: serial('id').primaryKey(),
|
|
14
|
+
section: text('section').notNull(),
|
|
15
|
+
slug: text('slug').notNull(),
|
|
16
|
+
locale: text('locale').notNull().default('zh-CN'),
|
|
17
|
+
title: text('title').notNull(),
|
|
18
|
+
description: text('description').notNull(),
|
|
19
|
+
publishedAt: timestamp('published_at', { withTimezone: true, mode: 'date' }).notNull(),
|
|
20
|
+
updatedAt: timestamp('updated_at', { withTimezone: true, mode: 'date' }).notNull(),
|
|
21
|
+
tags: text('tags').notNull().default('[]'),
|
|
22
|
+
meta: text('meta').notNull().default('{}'),
|
|
23
|
+
bodyMd: text('body_md').notNull(),
|
|
24
|
+
bodyHtml: text('body_html').notNull(),
|
|
25
|
+
rendererVersion: text('renderer_version').notNull(),
|
|
26
|
+
checksum: text('checksum').notNull(),
|
|
27
|
+
draft: boolean('draft').notNull().default(false),
|
|
28
|
+
author: text('author'),
|
|
29
|
+
},
|
|
30
|
+
(t) => [uniqueIndex('content_section_locale_slug_uq').on(t.section, t.locale, t.slug)],
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export const redirects = pgTable(
|
|
34
|
+
'redirects',
|
|
35
|
+
{
|
|
36
|
+
id: serial('id').primaryKey(),
|
|
37
|
+
fromPath: text('from_path').notNull(),
|
|
38
|
+
toPath: text('to_path').notNull(),
|
|
39
|
+
createdAt: timestamp('created_at', { withTimezone: true, mode: 'date' }).notNull(),
|
|
40
|
+
},
|
|
41
|
+
(t) => [uniqueIndex('redirects_from_path_uq').on(t.fromPath)],
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
export const kv = pgTable('kv', {
|
|
45
|
+
key: text('key').primaryKey(),
|
|
46
|
+
value: text('value').notNull(),
|
|
47
|
+
expiresAt: timestamp('expires_at', { withTimezone: true, mode: 'date' }),
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/* ------------------------------------------------------------ auth(M2,better-auth 四表 PG 镜像) */
|
|
51
|
+
|
|
52
|
+
export const user = pgTable('user', {
|
|
53
|
+
id: text('id').primaryKey(),
|
|
54
|
+
name: text('name').notNull(),
|
|
55
|
+
email: text('email').notNull().unique(),
|
|
56
|
+
emailVerified: boolean('email_verified').notNull().default(false),
|
|
57
|
+
image: text('image'),
|
|
58
|
+
createdAt: timestamp('created_at', { withTimezone: true, mode: 'date' }).notNull(),
|
|
59
|
+
updatedAt: timestamp('updated_at', { withTimezone: true, mode: 'date' }).notNull(),
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export const session = pgTable('session', {
|
|
63
|
+
id: text('id').primaryKey(),
|
|
64
|
+
expiresAt: timestamp('expires_at', { withTimezone: true, mode: 'date' }).notNull(),
|
|
65
|
+
token: text('token').notNull().unique(),
|
|
66
|
+
createdAt: timestamp('created_at', { withTimezone: true, mode: 'date' }).notNull(),
|
|
67
|
+
updatedAt: timestamp('updated_at', { withTimezone: true, mode: 'date' }).notNull(),
|
|
68
|
+
ipAddress: text('ip_address'),
|
|
69
|
+
userAgent: text('user_agent'),
|
|
70
|
+
userId: text('user_id')
|
|
71
|
+
.notNull()
|
|
72
|
+
.references(() => user.id, { onDelete: 'cascade' }),
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export const account = pgTable('account', {
|
|
76
|
+
id: text('id').primaryKey(),
|
|
77
|
+
accountId: text('account_id').notNull(),
|
|
78
|
+
providerId: text('provider_id').notNull(),
|
|
79
|
+
userId: text('user_id')
|
|
80
|
+
.notNull()
|
|
81
|
+
.references(() => user.id, { onDelete: 'cascade' }),
|
|
82
|
+
accessToken: text('access_token'),
|
|
83
|
+
refreshToken: text('refresh_token'),
|
|
84
|
+
idToken: text('id_token'),
|
|
85
|
+
accessTokenExpiresAt: timestamp('access_token_expires_at', { withTimezone: true, mode: 'date' }),
|
|
86
|
+
refreshTokenExpiresAt: timestamp('refresh_token_expires_at', { withTimezone: true, mode: 'date' }),
|
|
87
|
+
scope: text('scope'),
|
|
88
|
+
password: text('password'),
|
|
89
|
+
createdAt: timestamp('created_at', { withTimezone: true, mode: 'date' }).notNull(),
|
|
90
|
+
updatedAt: timestamp('updated_at', { withTimezone: true, mode: 'date' }).notNull(),
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export const verification = pgTable('verification', {
|
|
94
|
+
id: text('id').primaryKey(),
|
|
95
|
+
identifier: text('identifier').notNull(),
|
|
96
|
+
value: text('value').notNull(),
|
|
97
|
+
expiresAt: timestamp('expires_at', { withTimezone: true, mode: 'date' }).notNull(),
|
|
98
|
+
createdAt: timestamp('created_at', { withTimezone: true, mode: 'date' }),
|
|
99
|
+
updatedAt: timestamp('updated_at', { withTimezone: true, mode: 'date' }),
|
|
100
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
CREATE TABLE "content" (
|
|
2
|
+
"id" serial PRIMARY KEY NOT NULL,
|
|
3
|
+
"section" text NOT NULL,
|
|
4
|
+
"slug" text NOT NULL,
|
|
5
|
+
"locale" text DEFAULT 'zh-CN' NOT NULL,
|
|
6
|
+
"title" text NOT NULL,
|
|
7
|
+
"description" text NOT NULL,
|
|
8
|
+
"published_at" timestamp with time zone NOT NULL,
|
|
9
|
+
"updated_at" timestamp with time zone NOT NULL,
|
|
10
|
+
"tags" text DEFAULT '[]' NOT NULL,
|
|
11
|
+
"meta" text DEFAULT '{}' NOT NULL,
|
|
12
|
+
"body_md" text NOT NULL,
|
|
13
|
+
"body_html" text NOT NULL,
|
|
14
|
+
"renderer_version" text NOT NULL,
|
|
15
|
+
"checksum" text NOT NULL,
|
|
16
|
+
"draft" boolean DEFAULT false NOT NULL,
|
|
17
|
+
"author" text
|
|
18
|
+
);
|
|
19
|
+
--> statement-breakpoint
|
|
20
|
+
CREATE TABLE "kv" (
|
|
21
|
+
"key" text PRIMARY KEY NOT NULL,
|
|
22
|
+
"value" text NOT NULL,
|
|
23
|
+
"expires_at" timestamp with time zone
|
|
24
|
+
);
|
|
25
|
+
--> statement-breakpoint
|
|
26
|
+
CREATE TABLE "redirects" (
|
|
27
|
+
"id" serial PRIMARY KEY NOT NULL,
|
|
28
|
+
"from_path" text NOT NULL,
|
|
29
|
+
"to_path" text NOT NULL,
|
|
30
|
+
"created_at" timestamp with time zone NOT NULL
|
|
31
|
+
);
|
|
32
|
+
--> statement-breakpoint
|
|
33
|
+
CREATE UNIQUE INDEX "content_section_locale_slug_uq" ON "content" USING btree ("section","locale","slug");--> statement-breakpoint
|
|
34
|
+
CREATE UNIQUE INDEX "redirects_from_path_uq" ON "redirects" USING btree ("from_path");
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
CREATE TABLE "account" (
|
|
2
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
3
|
+
"account_id" text NOT NULL,
|
|
4
|
+
"provider_id" text NOT NULL,
|
|
5
|
+
"user_id" text NOT NULL,
|
|
6
|
+
"access_token" text,
|
|
7
|
+
"refresh_token" text,
|
|
8
|
+
"id_token" text,
|
|
9
|
+
"access_token_expires_at" timestamp with time zone,
|
|
10
|
+
"refresh_token_expires_at" timestamp with time zone,
|
|
11
|
+
"scope" text,
|
|
12
|
+
"password" text,
|
|
13
|
+
"created_at" timestamp with time zone NOT NULL,
|
|
14
|
+
"updated_at" timestamp with time zone NOT NULL
|
|
15
|
+
);
|
|
16
|
+
--> statement-breakpoint
|
|
17
|
+
CREATE TABLE "session" (
|
|
18
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
19
|
+
"expires_at" timestamp with time zone NOT NULL,
|
|
20
|
+
"token" text NOT NULL,
|
|
21
|
+
"created_at" timestamp with time zone NOT NULL,
|
|
22
|
+
"updated_at" timestamp with time zone NOT NULL,
|
|
23
|
+
"ip_address" text,
|
|
24
|
+
"user_agent" text,
|
|
25
|
+
"user_id" text NOT NULL,
|
|
26
|
+
CONSTRAINT "session_token_unique" UNIQUE("token")
|
|
27
|
+
);
|
|
28
|
+
--> statement-breakpoint
|
|
29
|
+
CREATE TABLE "user" (
|
|
30
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
31
|
+
"name" text NOT NULL,
|
|
32
|
+
"email" text NOT NULL,
|
|
33
|
+
"email_verified" boolean DEFAULT false NOT NULL,
|
|
34
|
+
"image" text,
|
|
35
|
+
"created_at" timestamp with time zone NOT NULL,
|
|
36
|
+
"updated_at" timestamp with time zone NOT NULL,
|
|
37
|
+
CONSTRAINT "user_email_unique" UNIQUE("email")
|
|
38
|
+
);
|
|
39
|
+
--> statement-breakpoint
|
|
40
|
+
CREATE TABLE "verification" (
|
|
41
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
42
|
+
"identifier" text NOT NULL,
|
|
43
|
+
"value" text NOT NULL,
|
|
44
|
+
"expires_at" timestamp with time zone NOT NULL,
|
|
45
|
+
"created_at" timestamp with time zone,
|
|
46
|
+
"updated_at" timestamp with time zone
|
|
47
|
+
);
|
|
48
|
+
--> statement-breakpoint
|
|
49
|
+
ALTER TABLE "account" ADD CONSTRAINT "account_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
50
|
+
ALTER TABLE "session" ADD CONSTRAINT "session_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# PG 方言 migrations(P1 接口预留,M1 不实测连接)
|
|
2
|
+
|
|
3
|
+
## 产出方式
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm run db:generate:pg
|
|
7
|
+
# = drizzle-kit generate --config drizzle.pg.config.ts
|
|
8
|
+
# schema: drizzle/pg/schema.ts(与 drizzle/schema.ts SQLite 定义字段镜像)
|
|
9
|
+
# out: drizzle/postgres/(0000_*.sql + meta/_journal.json)
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
drizzle-kit generate 是纯静态 diff(schema 声明 → SQL),不连接数据库。
|
|
13
|
+
|
|
14
|
+
## 应用方式(将来真实 PG 时)
|
|
15
|
+
|
|
16
|
+
- node/VPS:`drizzle-orm/node-postgres` 的 migrator(`migrate(db, { migrationsFolder: './drizzle/postgres' })`)
|
|
17
|
+
- 或直接 psql 逐文件执行 `drizzle/postgres/0000_*.sql`
|
|
18
|
+
|
|
19
|
+
## 平台接线
|
|
20
|
+
|
|
21
|
+
见 `engine/platform.postgres.ts`:注入预构建的 drizzle PG 实例
|
|
22
|
+
(node = postgres-js,workers = Hyperdrive connection string,M4 通道)。
|
|
23
|
+
cache/kv 用内存实现起步;kv 表已在 `0000_*.sql` 中,P1 时切落库版。
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "d22a4cc1-e406-4d70-a91b-3cf77ea431fc",
|
|
3
|
+
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
4
|
+
"version": "7",
|
|
5
|
+
"dialect": "postgresql",
|
|
6
|
+
"tables": {
|
|
7
|
+
"public.content": {
|
|
8
|
+
"name": "content",
|
|
9
|
+
"schema": "",
|
|
10
|
+
"columns": {
|
|
11
|
+
"id": {
|
|
12
|
+
"name": "id",
|
|
13
|
+
"type": "serial",
|
|
14
|
+
"primaryKey": true,
|
|
15
|
+
"notNull": true
|
|
16
|
+
},
|
|
17
|
+
"section": {
|
|
18
|
+
"name": "section",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true
|
|
22
|
+
},
|
|
23
|
+
"slug": {
|
|
24
|
+
"name": "slug",
|
|
25
|
+
"type": "text",
|
|
26
|
+
"primaryKey": false,
|
|
27
|
+
"notNull": true
|
|
28
|
+
},
|
|
29
|
+
"locale": {
|
|
30
|
+
"name": "locale",
|
|
31
|
+
"type": "text",
|
|
32
|
+
"primaryKey": false,
|
|
33
|
+
"notNull": true,
|
|
34
|
+
"default": "'zh-CN'"
|
|
35
|
+
},
|
|
36
|
+
"title": {
|
|
37
|
+
"name": "title",
|
|
38
|
+
"type": "text",
|
|
39
|
+
"primaryKey": false,
|
|
40
|
+
"notNull": true
|
|
41
|
+
},
|
|
42
|
+
"description": {
|
|
43
|
+
"name": "description",
|
|
44
|
+
"type": "text",
|
|
45
|
+
"primaryKey": false,
|
|
46
|
+
"notNull": true
|
|
47
|
+
},
|
|
48
|
+
"published_at": {
|
|
49
|
+
"name": "published_at",
|
|
50
|
+
"type": "timestamp with time zone",
|
|
51
|
+
"primaryKey": false,
|
|
52
|
+
"notNull": true
|
|
53
|
+
},
|
|
54
|
+
"updated_at": {
|
|
55
|
+
"name": "updated_at",
|
|
56
|
+
"type": "timestamp with time zone",
|
|
57
|
+
"primaryKey": false,
|
|
58
|
+
"notNull": true
|
|
59
|
+
},
|
|
60
|
+
"tags": {
|
|
61
|
+
"name": "tags",
|
|
62
|
+
"type": "text",
|
|
63
|
+
"primaryKey": false,
|
|
64
|
+
"notNull": true,
|
|
65
|
+
"default": "'[]'"
|
|
66
|
+
},
|
|
67
|
+
"meta": {
|
|
68
|
+
"name": "meta",
|
|
69
|
+
"type": "text",
|
|
70
|
+
"primaryKey": false,
|
|
71
|
+
"notNull": true,
|
|
72
|
+
"default": "'{}'"
|
|
73
|
+
},
|
|
74
|
+
"body_md": {
|
|
75
|
+
"name": "body_md",
|
|
76
|
+
"type": "text",
|
|
77
|
+
"primaryKey": false,
|
|
78
|
+
"notNull": true
|
|
79
|
+
},
|
|
80
|
+
"body_html": {
|
|
81
|
+
"name": "body_html",
|
|
82
|
+
"type": "text",
|
|
83
|
+
"primaryKey": false,
|
|
84
|
+
"notNull": true
|
|
85
|
+
},
|
|
86
|
+
"renderer_version": {
|
|
87
|
+
"name": "renderer_version",
|
|
88
|
+
"type": "text",
|
|
89
|
+
"primaryKey": false,
|
|
90
|
+
"notNull": true
|
|
91
|
+
},
|
|
92
|
+
"checksum": {
|
|
93
|
+
"name": "checksum",
|
|
94
|
+
"type": "text",
|
|
95
|
+
"primaryKey": false,
|
|
96
|
+
"notNull": true
|
|
97
|
+
},
|
|
98
|
+
"draft": {
|
|
99
|
+
"name": "draft",
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"primaryKey": false,
|
|
102
|
+
"notNull": true,
|
|
103
|
+
"default": false
|
|
104
|
+
},
|
|
105
|
+
"author": {
|
|
106
|
+
"name": "author",
|
|
107
|
+
"type": "text",
|
|
108
|
+
"primaryKey": false,
|
|
109
|
+
"notNull": false
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"indexes": {
|
|
113
|
+
"content_section_locale_slug_uq": {
|
|
114
|
+
"name": "content_section_locale_slug_uq",
|
|
115
|
+
"columns": [
|
|
116
|
+
{
|
|
117
|
+
"expression": "section",
|
|
118
|
+
"isExpression": false,
|
|
119
|
+
"asc": true,
|
|
120
|
+
"nulls": "last"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"expression": "locale",
|
|
124
|
+
"isExpression": false,
|
|
125
|
+
"asc": true,
|
|
126
|
+
"nulls": "last"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"expression": "slug",
|
|
130
|
+
"isExpression": false,
|
|
131
|
+
"asc": true,
|
|
132
|
+
"nulls": "last"
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"isUnique": true,
|
|
136
|
+
"concurrently": false,
|
|
137
|
+
"method": "btree",
|
|
138
|
+
"with": {}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"foreignKeys": {},
|
|
142
|
+
"compositePrimaryKeys": {},
|
|
143
|
+
"uniqueConstraints": {},
|
|
144
|
+
"policies": {},
|
|
145
|
+
"checkConstraints": {},
|
|
146
|
+
"isRLSEnabled": false
|
|
147
|
+
},
|
|
148
|
+
"public.kv": {
|
|
149
|
+
"name": "kv",
|
|
150
|
+
"schema": "",
|
|
151
|
+
"columns": {
|
|
152
|
+
"key": {
|
|
153
|
+
"name": "key",
|
|
154
|
+
"type": "text",
|
|
155
|
+
"primaryKey": true,
|
|
156
|
+
"notNull": true
|
|
157
|
+
},
|
|
158
|
+
"value": {
|
|
159
|
+
"name": "value",
|
|
160
|
+
"type": "text",
|
|
161
|
+
"primaryKey": false,
|
|
162
|
+
"notNull": true
|
|
163
|
+
},
|
|
164
|
+
"expires_at": {
|
|
165
|
+
"name": "expires_at",
|
|
166
|
+
"type": "timestamp with time zone",
|
|
167
|
+
"primaryKey": false,
|
|
168
|
+
"notNull": false
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"indexes": {},
|
|
172
|
+
"foreignKeys": {},
|
|
173
|
+
"compositePrimaryKeys": {},
|
|
174
|
+
"uniqueConstraints": {},
|
|
175
|
+
"policies": {},
|
|
176
|
+
"checkConstraints": {},
|
|
177
|
+
"isRLSEnabled": false
|
|
178
|
+
},
|
|
179
|
+
"public.redirects": {
|
|
180
|
+
"name": "redirects",
|
|
181
|
+
"schema": "",
|
|
182
|
+
"columns": {
|
|
183
|
+
"id": {
|
|
184
|
+
"name": "id",
|
|
185
|
+
"type": "serial",
|
|
186
|
+
"primaryKey": true,
|
|
187
|
+
"notNull": true
|
|
188
|
+
},
|
|
189
|
+
"from_path": {
|
|
190
|
+
"name": "from_path",
|
|
191
|
+
"type": "text",
|
|
192
|
+
"primaryKey": false,
|
|
193
|
+
"notNull": true
|
|
194
|
+
},
|
|
195
|
+
"to_path": {
|
|
196
|
+
"name": "to_path",
|
|
197
|
+
"type": "text",
|
|
198
|
+
"primaryKey": false,
|
|
199
|
+
"notNull": true
|
|
200
|
+
},
|
|
201
|
+
"created_at": {
|
|
202
|
+
"name": "created_at",
|
|
203
|
+
"type": "timestamp with time zone",
|
|
204
|
+
"primaryKey": false,
|
|
205
|
+
"notNull": true
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"indexes": {
|
|
209
|
+
"redirects_from_path_uq": {
|
|
210
|
+
"name": "redirects_from_path_uq",
|
|
211
|
+
"columns": [
|
|
212
|
+
{
|
|
213
|
+
"expression": "from_path",
|
|
214
|
+
"isExpression": false,
|
|
215
|
+
"asc": true,
|
|
216
|
+
"nulls": "last"
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
"isUnique": true,
|
|
220
|
+
"concurrently": false,
|
|
221
|
+
"method": "btree",
|
|
222
|
+
"with": {}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"foreignKeys": {},
|
|
226
|
+
"compositePrimaryKeys": {},
|
|
227
|
+
"uniqueConstraints": {},
|
|
228
|
+
"policies": {},
|
|
229
|
+
"checkConstraints": {},
|
|
230
|
+
"isRLSEnabled": false
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"enums": {},
|
|
234
|
+
"schemas": {},
|
|
235
|
+
"sequences": {},
|
|
236
|
+
"roles": {},
|
|
237
|
+
"policies": {},
|
|
238
|
+
"views": {},
|
|
239
|
+
"_meta": {
|
|
240
|
+
"columns": {},
|
|
241
|
+
"schemas": {},
|
|
242
|
+
"tables": {}
|
|
243
|
+
}
|
|
244
|
+
}
|