🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@katasumi/core

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@katasumi/core

Core types and database adapters for Katasumi

latest
npmnpm
Version
0.0.9
Version published
Weekly downloads
37
428.57%
Maintainers
1
Weekly downloads
 
Created
Source

Database Migrations

This directory contains database migration files for Katasumi.

Migration File Format

Migration files should follow this naming convention:

YYYYMMDD_HHMMSS_description.js

Example: 20260126_221245_initial_schema.js

Migration Structure

Each migration file must export two functions:

exports.up = async function up(db) {
  // Migration code to apply changes
  await db.$executeRawUnsafe(`CREATE TABLE ...`);
};

exports.down = async function down(db) {
  // Migration code to revert changes
  await db.$executeRawUnsafe(`DROP TABLE ...`);
};

Running Migrations

From the monorepo root:

# Run all pending migrations
npm run migrate

# Rollback the last migration
npm run migrate:rollback

# Check migration status
npm run migrate:status

From the core package:

cd packages/core

# Run migrations
DATABASE_URL="file:./database.db" npm run migrate

# For PostgreSQL
DATABASE_URL="postgres://user:password@localhost:5432/db" DB_TYPE=postgres npm run migrate

Supported Databases

  • SQLite (default)
  • PostgreSQL

Both databases use the same migration files, which are written to be compatible with both systems.

Keywords

shortcuts

FAQs

Package last updated on 15 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts