refacto: morbac_pg -> pg_morbac
This commit is contained in:
+9
-9
@@ -4,34 +4,34 @@
|
||||
|
||||
This extension uses a single-source version approach:
|
||||
|
||||
- **Version source of truth**: `morbac_pg.control` (the `default_version` field)
|
||||
- **Development file**: `morbac_pg.sql` (unversioned, for daily work)
|
||||
- **Release files**: `morbac_pg--X.Y.Z.sql` (generated, git-ignored)
|
||||
- **Version source of truth**: `pg_morbac.control` (the `default_version` field)
|
||||
- **Development file**: `pg_morbac.sql` (unversioned, for daily work)
|
||||
- **Release files**: `pg_morbac--X.Y.Z.sql` (generated, git-ignored)
|
||||
|
||||
## Daily Development
|
||||
|
||||
1. **Edit**: Work on `morbac_pg.sql` (no version numbers in the file)
|
||||
1. **Edit**: Work on `pg_morbac.sql` (no version numbers in the file)
|
||||
2. **Test**: Run `make test` to test changes in a temporary database
|
||||
3. **Commit**: Commit `morbac_pg.sql` to git regularly
|
||||
3. **Commit**: Commit `pg_morbac.sql` to git regularly
|
||||
|
||||
## Release Process
|
||||
|
||||
When ready to release a new version:
|
||||
|
||||
1. **Update version**: Edit `morbac_pg.control` and change `default_version`
|
||||
1. **Update version**: Edit `pg_morbac.control` and change `default_version`
|
||||
```
|
||||
default_version = '1.1.0'
|
||||
```
|
||||
|
||||
2. **Create release**: Run `make release`
|
||||
- Reads version from `.control` file
|
||||
- Copies `morbac_pg.sql` → `morbac_pg--X.Y.Z.sql`
|
||||
- Copies `pg_morbac.sql` → `pg_morbac--X.Y.Z.sql`
|
||||
|
||||
3. **Test**: Run `make test` with the versioned file
|
||||
|
||||
4. **Tag in git**:
|
||||
```bash
|
||||
git add morbac_pg.control morbac_pg--X.Y.Z.sql
|
||||
git add pg_morbac.control pg_morbac--X.Y.Z.sql
|
||||
git commit -m "Release vX.Y.Z"
|
||||
git tag vX.Y.Z
|
||||
git push origin main --tags
|
||||
@@ -42,7 +42,7 @@ When ready to release a new version:
|
||||
For version migrations, create upgrade scripts:
|
||||
```bash
|
||||
# Example: upgrade from 1.0.0 to 1.1.0
|
||||
touch morbac_pg--1.0.0--1.1.0.sql
|
||||
touch pg_morbac--1.0.0--1.1.0.sql
|
||||
```
|
||||
|
||||
These contain only the ALTER/ADD statements needed for the upgrade.
|
||||
|
||||
Reference in New Issue
Block a user