Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion __fixtures__/stage/extensions/@pgpm/inflection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ SELECT slug FROM blog_posts;

## Integration Examples

### With @pgpm/db-meta-schema
### With @pgpm/metaschema-schema

Use inflection for schema introspection and code generation:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @pgpm/db-meta-modules
# @pgpm/metaschema-modules

<p align="center" width="100%">
<img height="250" src="https://raw.githubusercontent.com/constructive-io/constructive/refs/heads/main/assets/outline-logo.svg" />
Expand All @@ -9,14 +9,14 @@
<img height="20" src="https://github.com/constructive-io/pgpm-modules/actions/workflows/ci.yml/badge.svg" />
</a>
<a href="https://github.com/constructive-io/pgpm-modules/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
<a href="https://www.npmjs.com/package/@pgpm/db-meta-modules"><img height="20" src="https://img.shields.io/github/package-json/v/constructive-io/pgpm-modules?filename=packages%2Fmeta%2Fdb-meta-modules%2Fpackage.json"/></a>
<a href="https://www.npmjs.com/package/@pgpm/metaschema-modules"><img height="20" src="https://img.shields.io/github/package-json/v/constructive-io/pgpm-modules?filename=packages%2Fmetaschema-modules%2Fpackage.json"/></a>
</p>

Module metadata handling and dependency tracking.

## Overview

`@pgpm/db-meta-modules` extends the `@pgpm/db-meta-schema` package with module-specific metadata tables. This package provides tables for tracking various pgpm modules including authentication, permissions, memberships, encrypted secrets, and more. It enables configuration and metadata storage for modular application features.
`@pgpm/metaschema-modules` extends the `@pgpm/metaschema-schema` package with module-specific metadata tables. This package provides tables for tracking various pgpm modules including authentication, permissions, memberships, encrypted secrets, and more. It enables configuration and metadata storage for modular application features.

## Features

Expand All @@ -33,7 +33,7 @@ Module metadata handling and dependency tracking.
If you have `pgpm` installed:

```bash
pgpm install @pgpm/db-meta-modules
pgpm install @pgpm/metaschema-modules
pgpm deploy
```

Expand All @@ -56,7 +56,7 @@ eval "$(pgpm env)"

```bash
# 1. Install the package
pgpm install @pgpm/db-meta-modules
pgpm install @pgpm/metaschema-modules

# 2. Deploy locally
pgpm deploy
Expand All @@ -74,7 +74,7 @@ pgpm init

# 3. Install a package
cd packages/my-module
pgpm install @pgpm/db-meta-modules
pgpm install @pgpm/metaschema-modules

# 4. Deploy everything
pgpm deploy --createdb --database mydb1
Expand Down Expand Up @@ -213,7 +213,7 @@ Use module tables as feature flags:

## Dependencies

- `@pgpm/db-meta-schema`: Core metadata management
- `@pgpm/metaschema-schema`: Core metadata management
- `@pgpm/verify`: Verification utilities

## Testing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@pgpm/db-meta-modules",
"name": "@pgpm/metaschema-modules",
"version": "0.15.2",
"description": "Module metadata handling and dependency tracking",
"author": "Dan Lynch <pyramation@gmail.com>",
Expand All @@ -21,7 +21,7 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@pgpm/db-meta-schema": "0.15.2",
"@pgpm/metaschema-schema": "0.15.2",
"@pgpm/verify": "0.15.2"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @pgpm/db-meta-schema
# @pgpm/metaschema-schema

<p align="center" width="100%">
<img height="250" src="https://raw.githubusercontent.com/constructive-io/constructive/refs/heads/main/assets/outline-logo.svg" />
Expand All @@ -9,14 +9,14 @@
<img height="20" src="https://github.com/constructive-io/pgpm-modules/actions/workflows/ci.yml/badge.svg" />
</a>
<a href="https://github.com/constructive-io/pgpm-modules/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
<a href="https://www.npmjs.com/package/@pgpm/db-meta-schema"><img height="20" src="https://img.shields.io/github/package-json/v/constructive-io/pgpm-modules?filename=packages%2Fmeta%2Fdb-meta-schema%2Fpackage.json"/></a>
<a href="https://www.npmjs.com/package/@pgpm/metaschema-schema"><img height="20" src="https://img.shields.io/github/package-json/v/constructive-io/pgpm-modules?filename=packages%2Fmetaschema-schema%2Fpackage.json"/></a>
</p>

Database metadata utilities and introspection functions.

## Overview

`@pgpm/db-meta-schema` provides a comprehensive metadata management system for PostgreSQL databases. This package creates tables and schemas for storing and querying database structure information including databases, schemas, tables, fields, constraints, indexes, and more. It enables runtime schema introspection, metadata-driven code generation, and database structure management.
`@pgpm/metaschema-schema` provides a comprehensive metadata management system for PostgreSQL databases. This package creates tables and schemas for storing and querying database structure information including databases, schemas, tables, fields, constraints, indexes, and more. It enables runtime schema introspection, metadata-driven code generation, and database structure management.

## Features

Expand All @@ -34,7 +34,7 @@ Database metadata utilities and introspection functions.
If you have `pgpm` installed:

```bash
pgpm install @pgpm/db-meta-schema
pgpm install @pgpm/metaschema-schema
pgpm deploy
```

Expand All @@ -57,7 +57,7 @@ eval "$(pgpm env)"

```bash
# 1. Install the package
pgpm install @pgpm/db-meta-schema
pgpm install @pgpm/metaschema-schema

# 2. Deploy locally
pgpm deploy
Expand All @@ -75,7 +75,7 @@ pgpm init

# 3. Install a package
cd packages/my-module
pgpm install @pgpm/db-meta-schema
pgpm install @pgpm/metaschema-schema

# 4. Deploy everything
pgpm deploy --createdb --database mydb1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@pgpm/db-meta-schema",
"name": "@pgpm/metaschema-schema",
"version": "0.15.2",
"description": "Database metadata utilities and introspection functions",
"author": "Dan Lynch <pyramation@gmail.com>",
Expand Down
4 changes: 2 additions & 2 deletions pgpm/core/__tests__/export/export-flow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
* End-to-end test for the pgpm export flow.
*
* This test:
* 1. Sets up a temporary workspace with required pgpm modules (db-meta-schema, db-meta-modules, db-migrate)
* 1. Sets up a temporary workspace with required pgpm modules (metaschema-schema, metaschema-modules, db-migrate)
* 2. Creates a custom module with migrations to seed test data:
* - insert_sql_actions: Creates db_migrate.sql_actions table and inserts sample migration records
* - insert_meta_schema: Inserts metaschema_public data representing a pets application
* 3. Deploys everything to a test database
* 4. Runs the export flow and verifies the output
*
* PREREQUISITES:
* - The @pgpm/db-meta-schema, @pgpm/db-meta-modules, and @pgpm/db-migrate modules must be available
* - The @pgpm/metaschema-schema, @pgpm/metaschema-modules, and @pgpm/db-migrate modules must be available
* in the workspace's extensions/ directory or installable via pgpm install
*/

Expand Down
4 changes: 2 additions & 2 deletions pgpm/core/src/modules/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export type ModuleMap = Record<string, Module>;
export const PGPM_MODULE_MAP: Record<string, string> = {
'pgpm-base32': '@pgpm/base32',
'pgpm-database-jobs': '@pgpm/database-jobs',
'db-meta-modules': '@pgpm/db-meta-modules',
'db-meta-schema': '@pgpm/db-meta-schema',
'metaschema-modules': '@pgpm/metaschema-modules',
'metaschema-schema': '@pgpm/metaschema-schema',
'pgpm-inflection': '@pgpm/inflection',
'pgpm-jwt-claims': '@pgpm/jwt-claims',
'pgpm-stamps': '@pgpm/stamps',
Expand Down
6 changes: 3 additions & 3 deletions plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The `pgpm export` command's `meta_public` schema export is broken. The export fu
- Transaction-isolated tests with automatic rollback

3. **Test approach**:
- Install `@pgpm/db-meta-schema` and `@pgpm/db-meta-modules`
- Install `@pgpm/metaschema-schema` and `@pgpm/metaschema-modules`
- Seed representative data into all relevant tables
- Call `exportMeta()` to generate SQL
- Execute generated SQL in a fresh transaction
Expand Down Expand Up @@ -94,8 +94,8 @@ extensions/@pgpm/export-meta-test/

## Dependencies

- `@pgpm/db-meta-schema` - Core schema definitions
- `@pgpm/db-meta-modules` - Module table definitions
- `@pgpm/metaschema-schema` - Core schema definitions
- `@pgpm/metaschema-modules` - Module table definitions
- `pgsql-test` - Test infrastructure
- `@pgpmjs/core` - Export functionality to test

Expand Down
Loading