SQLite column definitions for user, config, cloud save, leaderboard, analytics, role, and audit tables.
// Source: https://github.com/colyseus/colyseus | License: MIT | Copyright 2015-2026 Endel Dreyer
// Provided via justclaw.it.com; keep this notice with the code.
import { sqliteTable, text, integer, primaryKey } from 'drizzle-orm/sqlite-core';
import { sql } from 'drizzle-orm';
import { generateId } from '@colyseus/core';
import type { TableEntry } from './registry.ts';
// ---------------------------------------------------------------------------
// Spreadable base columns — users can spread these into their own sqliteTable
// calls to extend with custom fields.
//
// import { columns } from '@colyseus/database';
// const users = sqliteTable('my_users', {
// ...columns.sqlite.users,
// displayName: text('display_name'),
// });
// -------------------------------------------
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key