refactor: reorganize project structure and update configurations
- Move migrations/ to database/schema/ for clarity on database schema definitions - Move sqlc.yaml to internal/database/ to group with database code - Move static/ to cmd/server/static/ to co-locate with server - Update all configuration files and documentation - Follow Go project conventions for better organization
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
-- Normalize existing folder paths in user_ebook_folders table
|
||||
-- This script will clean up inconsistent path formatting
|
||||
|
||||
UPDATE user_ebook_folders
|
||||
SET folder_path = REPLACE(REPLACE(folder_path, '\\', '/'), '//', '/')
|
||||
WHERE folder_path LIKE '%\\%' OR folder_path LIKE '%//%';
|
||||
|
||||
-- Remove trailing slashes from non-root paths
|
||||
UPDATE user_ebook_folders
|
||||
SET folder_path = CASE
|
||||
WHEN folder_path = '/' THEN '/'
|
||||
WHEN RIGHT(folder_path, 1) = '/' THEN LEFT(folder_path, LENGTH(folder_path) - 1)
|
||||
ELSE folder_path
|
||||
END
|
||||
WHERE folder_path != '/' AND RIGHT(folder_path, 1) = '/';
|
||||
Reference in New Issue
Block a user