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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user