Implement collection item reordering with bulk operations and persistent HTML attributes

- Add bulk reorder API endpoint (PUT /api/collections/{id}/reorder) with atomic transactions
- Replace individual position updates with efficient bulk operations in frontend
- Implement unified ID generation and proper data-item-id injection during enhancement
- Fix collection item position persistence through content edit cycles
- Add optimistic UI with rollback capability for better user experience
- Update sqlc queries to include last_edited_by fields in position updates
- Remove obsolete data-content-type attributes and unify naming conventions
This commit is contained in:
2025-10-07 22:59:00 +02:00
parent c5754181f6
commit 824719f07d
13 changed files with 545 additions and 55 deletions

View File

@@ -95,6 +95,16 @@ func (db *Database) GetDBType() string {
return db.dbType
}
// GetSQLiteDB returns the underlying SQLite database connection
func (db *Database) GetSQLiteDB() *sql.DB {
return db.conn
}
// GetPostgreSQLDB returns the underlying PostgreSQL database connection
func (db *Database) GetPostgreSQLDB() *sql.DB {
return db.conn
}
// initializeSQLiteSchema sets up the SQLite database schema
func (db *Database) initializeSQLiteSchema() error {
ctx := context.Background()