Skip to content

Commit 9d58c84

Browse files
committed
Update README
1 parent d32cca1 commit 9d58c84

File tree

7 files changed

+25
-25
lines changed

7 files changed

+25
-25
lines changed

CLAUDE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ cargo run -p vespertide-cli -- log
4646
2. **Baseline Reconstruction**: Applied migrations are replayed to rebuild the baseline schema
4747
3. **Diffing**: Current models are compared against the baseline to compute changes
4848
4. **Planning**: Changes are converted into a `MigrationPlan` with versioned actions
49-
5. **SQL Generation**: Migration actions are translated into PostgreSQL SQL statements
49+
5. **SQL Generation**: Migration actions are translated into SQL statements
5050

5151
### Crate Responsibilities
5252

@@ -59,7 +59,7 @@ cargo run -p vespertide-cli -- log
5959
- `plan_next_migration()`: Combines baseline reconstruction + diffing to create the next migration
6060
- `apply_action()`: Applies a single migration action to a schema (used during replay)
6161
- `validate_*()`: Validates schemas and migration plans
62-
- **vespertide-query**: Converts `MigrationAction`PostgreSQL SQL with bind parameters
62+
- **vespertide-query**: Converts `MigrationAction` → SQL with bind parameters
6363
- Uses `ColumnType::to_sql()` method for SQL type conversion
6464
- **vespertide-config**: Manages `vespertide.json` (models/migrations directories, naming case preferences)
6565
- **vespertide-cli**: Command-line interface implementation
@@ -111,7 +111,7 @@ SimpleColumnType::Integer.into()
111111

112112
### ColumnType Methods
113113
`ColumnType` provides two utility methods:
114-
- `to_sql()`: Returns the PostgreSQL SQL type string (e.g., `"INTEGER"`, `"VARCHAR(255)"`)
114+
- `to_sql()`: Returns the SQL type string (e.g., `"INTEGER"`, `"VARCHAR(255)"`)
115115
- `to_rust_type(nullable: bool)`: Returns the Rust type string for SeaORM entity generation (e.g., `"i32"` or `"Option<i32>"`)
116116

117117
These methods replace the old standalone functions `column_type_sql()` and `rust_type()`.
@@ -134,7 +134,7 @@ pub struct ForeignKeyDef {
134134
- The planner validates that column/table names follow the configured naming case
135135

136136
### SQL Generation Target
137-
All SQL generation currently targets **PostgreSQL only**. When modifying the query builder, ensure PostgreSQL compatibility.
137+
SQL generation currently uses PostgreSQL-compatible syntax. The query builder can be extended to support other database systems.
138138

139139
### JSON Schema Generation
140140
The `vespertide-schema-gen` crate uses `schemars` to generate JSON Schemas from the Rust types. After modifying core data structures, regenerate schemas with:
@@ -155,4 +155,4 @@ Schema base URL can be overridden via `VESP_SCHEMA_BASE_URL` environment variabl
155155

156156
- YAML loading is not implemented (templates can be generated but not parsed)
157157
- Runtime migration executor (`run_migrations`) in `vespertide-macro` is not implemented
158-
- Only PostgreSQL SQL generation is supported
158+
- SQL generation currently uses PostgreSQL-compatible syntax

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Vespertide
22

3-
Declarative database schema management for PostgreSQL. Define your schemas in JSON, and Vespertide automatically generates migration plans and SQL from model diffs.
3+
Declarative database schema management. Define your schemas in JSON, and Vespertide automatically generates migration plans and SQL from model diffs.
44

55
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
66
[![GitHub Actions](https://img.shields.io/github/actions/workflow/status/dev-five-git/vespertide/CI.yml?branch=main&label=CI)](https://github.com/dev-five-git/vespertide/actions)
@@ -12,7 +12,7 @@ Declarative database schema management for PostgreSQL. Define your schemas in JS
1212
- **Declarative Schema**: Define your desired database state in JSON files
1313
- **Automatic Diffing**: Vespertide compares your models against applied migrations to compute changes
1414
- **Migration Planning**: Generates typed migration actions (not raw SQL) for safety and portability
15-
- **PostgreSQL SQL Generation**: Converts migration actions to parameterized PostgreSQL statements
15+
- **SQL Generation**: Converts migration actions to parameterized SQL statements
1616
- **JSON Schema Validation**: Ships with JSON Schemas for IDE autocompletion and validation
1717
- **ORM Export**: Export schemas to SeaORM entities
1818

@@ -76,7 +76,7 @@ Models are JSON files in the `models/` directory:
7676
### Column Types
7777

7878
**Simple Types** (string values in JSON):
79-
| Type | PostgreSQL |
79+
| Type | SQL Type |
8080
|------|------------|
8181
| `"integer"` | INTEGER |
8282
| `"big_int"` | BIGINT |
@@ -128,7 +128,7 @@ See [SKILL.md](SKILL.md) for complete documentation on model definitions.
128128
vespertide/
129129
├── vespertide-core # Data structures (TableDef, ColumnDef, MigrationAction)
130130
├── vespertide-planner # Schema diffing and migration planning
131-
├── vespertide-query # PostgreSQL SQL generation
131+
├── vespertide-query # SQL generation
132132
├── vespertide-config # Configuration management
133133
├── vespertide-cli # Command-line interface
134134
├── vespertide-exporter # ORM code generation (SeaORM)
@@ -142,7 +142,7 @@ vespertide/
142142
2. **Replay Migrations**: Applied migrations are replayed to reconstruct the baseline schema
143143
3. **Diff Schemas**: Current models are compared against the baseline
144144
4. **Generate Plan**: Changes are converted into typed `MigrationAction` enums
145-
5. **Emit SQL**: Migration actions are translated to PostgreSQL SQL
145+
5. **Emit SQL**: Migration actions are translated to SQL
146146

147147
## Configuration
148148

@@ -179,7 +179,7 @@ cargo run -p vespertide-schema-gen -- --out schemas
179179

180180
## Limitations
181181

182-
- SQL generation targets **PostgreSQL only**
182+
- SQL generation currently uses PostgreSQL-compatible syntax
183183
- YAML loading is not yet implemented (templates can be generated but not parsed)
184184
- Runtime migration executor is not implemented
185185

SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
name: vespertide
3-
description: Define PostgreSQL database schemas in JSON and generate migration plans. Use this skill when creating or modifying database models, defining tables with columns, constraints, indexes, and foreign keys for Vespertide-based projects.
3+
description: Define database schemas in JSON and generate migration plans. Use this skill when creating or modifying database models, defining tables with columns, constraints, indexes, and foreign keys for Vespertide-based projects.
44
---
55

66
# Vespertide Database Schema Definition
77

8-
This skill helps you create and manage database models using Vespertide, a declarative schema management tool for PostgreSQL.
8+
This skill helps you create and manage database models using Vespertide, a declarative schema management tool.
99

1010
## Installation
1111

@@ -79,7 +79,7 @@ Column types in JSON can be either simple (string) or complex (object) values.
7979

8080
Simple types are represented as strings in JSON (snake_case):
8181

82-
| Type | PostgreSQL | Use Cases |
82+
| Type | SQL Type | Use Cases |
8383
|------|------------|-----------|
8484
| `"small_int"` | SMALLINT | Small integers (-32768 to 32767) |
8585
| `"integer"` | INTEGER | IDs, counters |

crates/vespertide-core/src/schema/column.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub enum ColumnType {
2828
}
2929

3030
impl ColumnType {
31-
/// Convert column type to PostgreSQL SQL type string
31+
/// Convert column type to SQL type string
3232
pub fn to_sql(&self) -> String {
3333
match self {
3434
ColumnType::Simple(ty) => match ty {

crates/vespertide-query/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ license.workspace = true
66
repository.workspace = true
77
homepage.workspace = true
88
documentation.workspace = true
9-
description = "Converts migration actions into PostgreSQL SQL statements with bind parameters"
9+
description = "Converts migration actions into SQL statements with bind parameters"
1010

1111
[dependencies]
1212
vespertide-core = { workspace = true }

crates/vespertide-query/src/sql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ pub fn build_action_queries(action: &MigrationAction) -> Result<Vec<BuiltQuery>,
202202
// For removing constraints, we need to handle each type differently
203203
let drop_sql = match constraint {
204204
TableConstraint::PrimaryKey { .. } => {
205-
// PostgreSQL syntax for dropping primary key
205+
// Syntax for dropping primary key
206206
format!("ALTER TABLE {t} DROP CONSTRAINT {t}_pkey;")
207207
}
208208
TableConstraint::Unique { name, columns } => {

0 commit comments

Comments
 (0)