Buckets:
| import { sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core" | |
| import { Timestamps } from "../database/schema.sql" | |
| import { ProjectV2 } from "../project" | |
| import { ProjectTable } from "../project/sql" | |
| import type { PermissionSaved } from "./saved" | |
| export const PermissionTable = sqliteTable( | |
| "permission", | |
| { | |
| id: text().$type<PermissionSaved.ID>().primaryKey(), | |
| project_id: text() | |
| .$type<ProjectV2.ID>() | |
| .notNull() | |
| .references(() => ProjectTable.id, { onDelete: "cascade" }), | |
| action: text().notNull(), | |
| resource: text().notNull(), | |
| ...Timestamps, | |
| }, | |
| (table) => [uniqueIndex("permission_project_action_resource_idx").on(table.project_id, table.action, table.resource)], | |
| ) | |
Xet Storage Details
- Size:
- 724 Bytes
- Xet hash:
- 09aad5b0fe9876761ff71fba2949e1d856f21db077a64b7f95929e8c34dd6378
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.