Database Index Name Convention

D

Daniel Okoye

@daniel-okoye

·

Generate database index names following strict conventions.

78 copies0 forks
Generate a database index name for this index.

Table: {{table_name}}
Columns: {{columns}}
Index type: {{index_type}}

Constraints:
- Format: idx_{table}_{columns}_{type}
- Maximum 63 characters (PostgreSQL limit)
- All lowercase
- Underscores only, no hyphens
- Abbreviate table name if needed to fit
- Column names separated by underscore
- Type suffix: btree, hash, gin, gist, unique

Output ONLY the index name and the CREATE INDEX statement.

Details

Category

Coding

Use Cases

Database naming conventionIndex creation automationSchema standardization

Works Best With

claude-opus-4.5gpt-5.2gemini-2.0-flash
Created Updated Shared

Create your own prompt vault and start sharing

Database Index Name Convention | Promptsy