Skip to content
Skills Library
Programming · Building & coding

rename-sql-table

/rename-sql-table

TRIGGER when user asks to rename the database table used by a SQL CRUD microservice.

Repository
fabric ↗
Licence
Apache-2.0
Last repository change
23.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 23.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

TRIGGER when user asks to rename the database table used by a SQL CRUD microservice.

Original author description

TRIGGER when user asks to rename the database table used by a SQL CRUD microservice.

How it works

  1. Workflow
Original SKILL.md headings · 60 lines, 284 words
SKILL.md preview
---
name: rename-sql-table
description: TRIGGER when user asks to rename the database table used by a SQL CRUD microservice.
---

**CRITICAL**: Read and analyze this microservice before starting. Do NOT explore or analyze other microservices unless explicitly instructed to do so. The instructions in this skill are self-contained to this microservice.

**IMPORTANT**: `old_table_name` and `new_table_name` are placeholders for the actual old and new table names.

## Workflow

Copy this checklist and track your progress:

```
Renaming the database table:
- [ ] Step 1: Update Table Name Const
- [ ] Step 2: Update Database Schema
- [ ] Step 3: Housekeeping
```

#### Step 1: Update Table Name Const

Update the `tableName` const in `service.go` to the new table name. Do NOT change the `sequenceName`.

```go
const (
	tableName        = "new_table_name"
	sequenceName     = "old_table_name@0f7ce540" // Do not change
	// ...
)
```

#### Step 2: Update Database Schema

Create a new migration script file in `resources/sql` with an incremental file name. **IMPORTANT**: Do not edit an existing migration file.

```sql
-- DRIVER: mysql
RENAME TABLE old_table_name TO new_table_name;

-- DRIVER: pgx
ALTER TABLE old_table_name RENAME TO new_table_name;

-- DRIVER: mssql
EXEC sp_rename 'old_table_name', 'new_table_name';
```

Refer to the older `.sql` migration files to identify what if any indices were associated with the old table name. Append statements to the migration script to rename these indices, replacing the old table name with the new one.

```sql
-- DRIVER: mysql
ALTER TABLE new_table_name RENAME INDEX old_table_name_idx_field TO new_table_name_idx_field;

-- DRIVER: pgx
ALTER INDEX old_table_name_idx_field RENAME TO new_table_name_idx_field;

-- DRIVER: mssql
EXEC sp_rename 'old_table_name_idx_field', 'new_table_name_idx_field', 'INDEX';
```

#### Step 3: Housekeeping

Follow the `housekeeping` skill. Renaming the SQL table changes only the hand-written `service.go` column mappings and `resources/sql` migrations, not `definition.go`, so the boilerplate regeneration is a no-op; the `Version` bump and `go vet` still apply.

Versions

The database has no other skills named rename-sql-table.

Database snapshot: 13.11.2026 · package version a265f2a2bb1a (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100rename-sql-object
    TRIGGER when user asks to rename the object type or struct used by a SQL CRUD microservice.
  • 100add-sql-microservice
    TRIGGER when user asks to create a CRUD microservice, database-backed service, or a service to persist/store objects in SQL (MySQL, Postgres, MSSQL).
  • 100curd
    Generates complete CRUD module from database table definition. Orchestrates 9 sub-skills. Use when user says "create CRUD", "generate module from table", or provides a table structure.
  • 100br-resource-table
    Build better-route 1.1 CRUD endpoints over a custom WordPress database table with Resource::make, restNamespace, sourceTable, primary key, fields, filters, sort, filterSchema, writeSchema, policy, pagination, allow, SQL NULL writes, stable ordering, or a custom…
  • 95lov-rename-project
    在保留兼容键与运行连续性的前提下重命名项目、路径和仓库。支持明确输入与结果回读。Use to rename a project and preserve compatibility.
  • 100azure-functions-sql-bindings
    Wires Azure Functions to Azure SQL Database with the SQL input and output bindings and the SQL trigger, including the change tracking the trigger cannot run without and the identity permissions the trigger needs beyond the ones the bindings need. Use when a user asks for "a…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.