mirror of
https://github.com/aykhans/slash-e.git
synced 2025-06-14 20:07:50 +00:00
feat: add open graph metadata field
This commit is contained in:
@ -43,7 +43,8 @@ CREATE TABLE shortcut (
|
||||
link TEXT NOT NULL,
|
||||
description TEXT NOT NULL DEFAULT '',
|
||||
visibility TEXT NOT NULL CHECK (visibility IN ('PRIVATE', 'WORKSPACE', 'PUBLIC')) DEFAULT 'PRIVATE',
|
||||
tag TEXT NOT NULL DEFAULT ''
|
||||
tag TEXT NOT NULL DEFAULT '',
|
||||
og_metadata TEXT NOT NULL DEFAULT '{}'
|
||||
);
|
||||
|
||||
CREATE INDEX idx_shortcut_name ON shortcut(name);
|
||||
|
1
store/db/migration/prod/0.3/00__add_og_metadata.sql
Normal file
1
store/db/migration/prod/0.3/00__add_og_metadata.sql
Normal file
@ -0,0 +1 @@
|
||||
ALTER TABLE shortcut ADD COLUMN og_metadata TEXT NOT NULL DEFAULT '{}';
|
@ -43,7 +43,8 @@ CREATE TABLE shortcut (
|
||||
link TEXT NOT NULL,
|
||||
description TEXT NOT NULL DEFAULT '',
|
||||
visibility TEXT NOT NULL CHECK (visibility IN ('PRIVATE', 'WORKSPACE', 'PUBLIC')) DEFAULT 'PRIVATE',
|
||||
tag TEXT NOT NULL DEFAULT ''
|
||||
tag TEXT NOT NULL DEFAULT '',
|
||||
og_metadata TEXT NOT NULL DEFAULT '{}'
|
||||
);
|
||||
|
||||
CREATE INDEX idx_shortcut_name ON shortcut(name);
|
||||
|
@ -38,7 +38,8 @@ INSERT INTO
|
||||
`creator_id`,
|
||||
`name`,
|
||||
`link`,
|
||||
`visibility`
|
||||
`visibility`,
|
||||
`og_metadata`
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@ -46,7 +47,8 @@ VALUES
|
||||
101,
|
||||
'schema-change',
|
||||
'https://www.bytebase.com/blog/how-to-handle-database-schema-change/#what-is-a-database-schema-change',
|
||||
'PUBLIC'
|
||||
'PUBLIC',
|
||||
'{"title":"How to Handle Database Migration / Schema Change?","description":"A database schema is the structure of a database, which describes the relationships between the different tables and fields in the database. A database schema change, also known as schema migration, or simply migration refers to any alteration to this structure, such as adding a new table, modifying the data type of a field, or changing the relationships between tables.","image":"https://www.bytebase.com/_next/image/?url=%2Fcontent%2Fblog%2Fhow-to-handle-database-schema-change%2Fchange.webp\u0026w=2048\u0026q=75"}'
|
||||
);
|
||||
|
||||
INSERT INTO
|
||||
|
Reference in New Issue
Block a user