feat: 统一sql命名、函数命名
This commit is contained in:
@@ -0,0 +1 @@
|
||||
ALTER TABLE files DROP COLUMN IF EXISTS file_url;
|
||||
10
internal/db/migrations/000011_add_column_to_files.up.sql
Normal file
10
internal/db/migrations/000011_add_column_to_files.up.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
ALTER TABLE files
|
||||
ADD COLUMN IF NOT EXISTS file_url TEXT;
|
||||
|
||||
UPDATE files
|
||||
SET file_url = '';
|
||||
|
||||
ALTER TABLE files
|
||||
ALTER COLUMN file_url SET NOT NULL;
|
||||
|
||||
COMMENT ON COLUMN files.file_url IS '完整路径';
|
||||
Reference in New Issue
Block a user