feat: Complete HTML-first architecture implementation with API integration
- Replace value field with html_content for direct HTML storage - Add original_template field for style detection preservation - Remove all markdown processing from injector (delete markdown.go) - Fix critical content extraction/injection bugs in engine - Add missing UpdateContent PUT handler for content persistence - Fix API client field names and add updateContent() method - Resolve content type validation (only allow text/link types) - Add UUID-based ID generation to prevent collisions - Complete first-pass processing workflow for unprocessed elements - Verify end-to-end: Enhancement → Database → API → Editor → Persistence All 37 files updated for HTML-first content management system. Phase 3a implementation complete and production ready.
This commit is contained in:
@@ -1,34 +1,37 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.30.0
|
||||
// source: content.sql
|
||||
|
||||
package sqlite
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const createContent = `-- name: CreateContent :one
|
||||
INSERT INTO content (id, site_id, value, type, last_edited_by)
|
||||
VALUES (?1, ?2, ?3, ?4, ?5)
|
||||
RETURNING id, site_id, value, type, created_at, updated_at, last_edited_by
|
||||
INSERT INTO content (id, site_id, html_content, original_template, type, last_edited_by)
|
||||
VALUES (?1, ?2, ?3, ?4, ?5, ?6)
|
||||
RETURNING id, site_id, html_content, original_template, type, created_at, updated_at, last_edited_by
|
||||
`
|
||||
|
||||
type CreateContentParams struct {
|
||||
ID string `json:"id"`
|
||||
SiteID string `json:"site_id"`
|
||||
Value string `json:"value"`
|
||||
Type string `json:"type"`
|
||||
LastEditedBy string `json:"last_edited_by"`
|
||||
ID string `json:"id"`
|
||||
SiteID string `json:"site_id"`
|
||||
HtmlContent string `json:"html_content"`
|
||||
OriginalTemplate sql.NullString `json:"original_template"`
|
||||
Type string `json:"type"`
|
||||
LastEditedBy string `json:"last_edited_by"`
|
||||
}
|
||||
|
||||
func (q *Queries) CreateContent(ctx context.Context, arg CreateContentParams) (Content, error) {
|
||||
row := q.db.QueryRowContext(ctx, createContent,
|
||||
arg.ID,
|
||||
arg.SiteID,
|
||||
arg.Value,
|
||||
arg.HtmlContent,
|
||||
arg.OriginalTemplate,
|
||||
arg.Type,
|
||||
arg.LastEditedBy,
|
||||
)
|
||||
@@ -36,7 +39,8 @@ func (q *Queries) CreateContent(ctx context.Context, arg CreateContentParams) (C
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.SiteID,
|
||||
&i.Value,
|
||||
&i.HtmlContent,
|
||||
&i.OriginalTemplate,
|
||||
&i.Type,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
@@ -45,6 +49,16 @@ func (q *Queries) CreateContent(ctx context.Context, arg CreateContentParams) (C
|
||||
return i, err
|
||||
}
|
||||
|
||||
const deleteAllSiteContent = `-- name: DeleteAllSiteContent :exec
|
||||
DELETE FROM content
|
||||
WHERE site_id = ?1
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteAllSiteContent(ctx context.Context, siteID string) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteAllSiteContent, siteID)
|
||||
return err
|
||||
}
|
||||
|
||||
const deleteContent = `-- name: DeleteContent :exec
|
||||
DELETE FROM content
|
||||
WHERE id = ?1 AND site_id = ?2
|
||||
@@ -61,7 +75,7 @@ func (q *Queries) DeleteContent(ctx context.Context, arg DeleteContentParams) er
|
||||
}
|
||||
|
||||
const getAllContent = `-- name: GetAllContent :many
|
||||
SELECT id, site_id, value, type, created_at, updated_at, last_edited_by
|
||||
SELECT id, site_id, html_content, original_template, type, created_at, updated_at, last_edited_by
|
||||
FROM content
|
||||
WHERE site_id = ?1
|
||||
ORDER BY updated_at DESC
|
||||
@@ -79,7 +93,8 @@ func (q *Queries) GetAllContent(ctx context.Context, siteID string) ([]Content,
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.SiteID,
|
||||
&i.Value,
|
||||
&i.HtmlContent,
|
||||
&i.OriginalTemplate,
|
||||
&i.Type,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
@@ -99,7 +114,7 @@ func (q *Queries) GetAllContent(ctx context.Context, siteID string) ([]Content,
|
||||
}
|
||||
|
||||
const getBulkContent = `-- name: GetBulkContent :many
|
||||
SELECT id, site_id, value, type, created_at, updated_at, last_edited_by
|
||||
SELECT id, site_id, html_content, original_template, type, created_at, updated_at, last_edited_by
|
||||
FROM content
|
||||
WHERE site_id = ?1 AND id IN (/*SLICE:ids*/?)
|
||||
`
|
||||
@@ -132,7 +147,8 @@ func (q *Queries) GetBulkContent(ctx context.Context, arg GetBulkContentParams)
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.SiteID,
|
||||
&i.Value,
|
||||
&i.HtmlContent,
|
||||
&i.OriginalTemplate,
|
||||
&i.Type,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
@@ -152,7 +168,7 @@ func (q *Queries) GetBulkContent(ctx context.Context, arg GetBulkContentParams)
|
||||
}
|
||||
|
||||
const getContent = `-- name: GetContent :one
|
||||
SELECT id, site_id, value, type, created_at, updated_at, last_edited_by
|
||||
SELECT id, site_id, html_content, original_template, type, created_at, updated_at, last_edited_by
|
||||
FROM content
|
||||
WHERE id = ?1 AND site_id = ?2
|
||||
`
|
||||
@@ -168,7 +184,8 @@ func (q *Queries) GetContent(ctx context.Context, arg GetContentParams) (Content
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.SiteID,
|
||||
&i.Value,
|
||||
&i.HtmlContent,
|
||||
&i.OriginalTemplate,
|
||||
&i.Type,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
@@ -179,13 +196,13 @@ func (q *Queries) GetContent(ctx context.Context, arg GetContentParams) (Content
|
||||
|
||||
const updateContent = `-- name: UpdateContent :one
|
||||
UPDATE content
|
||||
SET value = ?1, type = ?2, last_edited_by = ?3
|
||||
SET html_content = ?1, type = ?2, last_edited_by = ?3
|
||||
WHERE id = ?4 AND site_id = ?5
|
||||
RETURNING id, site_id, value, type, created_at, updated_at, last_edited_by
|
||||
RETURNING id, site_id, html_content, original_template, type, created_at, updated_at, last_edited_by
|
||||
`
|
||||
|
||||
type UpdateContentParams struct {
|
||||
Value string `json:"value"`
|
||||
HtmlContent string `json:"html_content"`
|
||||
Type string `json:"type"`
|
||||
LastEditedBy string `json:"last_edited_by"`
|
||||
ID string `json:"id"`
|
||||
@@ -194,7 +211,7 @@ type UpdateContentParams struct {
|
||||
|
||||
func (q *Queries) UpdateContent(ctx context.Context, arg UpdateContentParams) (Content, error) {
|
||||
row := q.db.QueryRowContext(ctx, updateContent,
|
||||
arg.Value,
|
||||
arg.HtmlContent,
|
||||
arg.Type,
|
||||
arg.LastEditedBy,
|
||||
arg.ID,
|
||||
@@ -204,7 +221,8 @@ func (q *Queries) UpdateContent(ctx context.Context, arg UpdateContentParams) (C
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.SiteID,
|
||||
&i.Value,
|
||||
&i.HtmlContent,
|
||||
&i.OriginalTemplate,
|
||||
&i.Type,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
@@ -214,28 +232,30 @@ func (q *Queries) UpdateContent(ctx context.Context, arg UpdateContentParams) (C
|
||||
}
|
||||
|
||||
const upsertContent = `-- name: UpsertContent :one
|
||||
INSERT INTO content (id, site_id, value, type, last_edited_by)
|
||||
VALUES (?1, ?2, ?3, ?4, ?5)
|
||||
INSERT INTO content (id, site_id, html_content, original_template, type, last_edited_by)
|
||||
VALUES (?1, ?2, ?3, ?4, ?5, ?6)
|
||||
ON CONFLICT(id, site_id) DO UPDATE SET
|
||||
value = EXCLUDED.value,
|
||||
html_content = EXCLUDED.html_content,
|
||||
type = EXCLUDED.type,
|
||||
last_edited_by = EXCLUDED.last_edited_by
|
||||
RETURNING id, site_id, value, type, created_at, updated_at, last_edited_by
|
||||
RETURNING id, site_id, html_content, original_template, type, created_at, updated_at, last_edited_by
|
||||
`
|
||||
|
||||
type UpsertContentParams struct {
|
||||
ID string `json:"id"`
|
||||
SiteID string `json:"site_id"`
|
||||
Value string `json:"value"`
|
||||
Type string `json:"type"`
|
||||
LastEditedBy string `json:"last_edited_by"`
|
||||
ID string `json:"id"`
|
||||
SiteID string `json:"site_id"`
|
||||
HtmlContent string `json:"html_content"`
|
||||
OriginalTemplate sql.NullString `json:"original_template"`
|
||||
Type string `json:"type"`
|
||||
LastEditedBy string `json:"last_edited_by"`
|
||||
}
|
||||
|
||||
func (q *Queries) UpsertContent(ctx context.Context, arg UpsertContentParams) (Content, error) {
|
||||
row := q.db.QueryRowContext(ctx, upsertContent,
|
||||
arg.ID,
|
||||
arg.SiteID,
|
||||
arg.Value,
|
||||
arg.HtmlContent,
|
||||
arg.OriginalTemplate,
|
||||
arg.Type,
|
||||
arg.LastEditedBy,
|
||||
)
|
||||
@@ -243,7 +263,8 @@ func (q *Queries) UpsertContent(ctx context.Context, arg UpsertContentParams) (C
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.SiteID,
|
||||
&i.Value,
|
||||
&i.HtmlContent,
|
||||
&i.OriginalTemplate,
|
||||
&i.Type,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.30.0
|
||||
|
||||
package sqlite
|
||||
|
||||
|
||||
@@ -1,25 +1,31 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.30.0
|
||||
|
||||
package sqlite
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
)
|
||||
|
||||
type Content struct {
|
||||
ID string `json:"id"`
|
||||
SiteID string `json:"site_id"`
|
||||
Value string `json:"value"`
|
||||
Type string `json:"type"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
LastEditedBy string `json:"last_edited_by"`
|
||||
ID string `json:"id"`
|
||||
SiteID string `json:"site_id"`
|
||||
HtmlContent string `json:"html_content"`
|
||||
OriginalTemplate sql.NullString `json:"original_template"`
|
||||
Type string `json:"type"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
LastEditedBy string `json:"last_edited_by"`
|
||||
}
|
||||
|
||||
type ContentVersion struct {
|
||||
VersionID int64 `json:"version_id"`
|
||||
ContentID string `json:"content_id"`
|
||||
SiteID string `json:"site_id"`
|
||||
Value string `json:"value"`
|
||||
Type string `json:"type"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
CreatedBy string `json:"created_by"`
|
||||
VersionID int64 `json:"version_id"`
|
||||
ContentID string `json:"content_id"`
|
||||
SiteID string `json:"site_id"`
|
||||
HtmlContent string `json:"html_content"`
|
||||
OriginalTemplate sql.NullString `json:"original_template"`
|
||||
Type string `json:"type"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
CreatedBy string `json:"created_by"`
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.30.0
|
||||
|
||||
package sqlite
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
type Querier interface {
|
||||
CreateContent(ctx context.Context, arg CreateContentParams) (Content, error)
|
||||
CreateContentVersion(ctx context.Context, arg CreateContentVersionParams) error
|
||||
DeleteAllSiteContent(ctx context.Context, siteID string) error
|
||||
DeleteContent(ctx context.Context, arg DeleteContentParams) error
|
||||
DeleteOldVersions(ctx context.Context, arg DeleteOldVersionsParams) error
|
||||
GetAllContent(ctx context.Context, siteID string) ([]Content, error)
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
CREATE TABLE content (
|
||||
id TEXT NOT NULL,
|
||||
site_id TEXT NOT NULL,
|
||||
value TEXT NOT NULL,
|
||||
html_content TEXT NOT NULL,
|
||||
original_template TEXT,
|
||||
type TEXT NOT NULL,
|
||||
created_at INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
||||
updated_at INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
||||
@@ -16,7 +17,8 @@ CREATE TABLE content_versions (
|
||||
version_id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
content_id TEXT NOT NULL,
|
||||
site_id TEXT NOT NULL,
|
||||
value TEXT NOT NULL,
|
||||
html_content TEXT NOT NULL,
|
||||
original_template TEXT,
|
||||
type TEXT NOT NULL,
|
||||
created_at INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
||||
created_by TEXT DEFAULT 'system' NOT NULL
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
CREATE TABLE IF NOT EXISTS content (
|
||||
id TEXT NOT NULL,
|
||||
site_id TEXT NOT NULL,
|
||||
value TEXT NOT NULL,
|
||||
type TEXT NOT NULL CHECK (type IN ('text', 'markdown', 'link')),
|
||||
html_content TEXT NOT NULL,
|
||||
original_template TEXT,
|
||||
type TEXT NOT NULL CHECK (type IN ('text', 'link')),
|
||||
created_at INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
||||
updated_at INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
||||
last_edited_by TEXT DEFAULT 'system' NOT NULL,
|
||||
@@ -15,7 +16,8 @@ CREATE TABLE IF NOT EXISTS content_versions (
|
||||
version_id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
content_id TEXT NOT NULL,
|
||||
site_id TEXT NOT NULL,
|
||||
value TEXT NOT NULL,
|
||||
html_content TEXT NOT NULL,
|
||||
original_template TEXT,
|
||||
type TEXT NOT NULL,
|
||||
created_at INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
||||
created_by TEXT DEFAULT 'system' NOT NULL
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.30.0
|
||||
// source: setup.sql
|
||||
|
||||
package sqlite
|
||||
@@ -13,8 +13,9 @@ const initializeSchema = `-- name: InitializeSchema :exec
|
||||
CREATE TABLE IF NOT EXISTS content (
|
||||
id TEXT NOT NULL,
|
||||
site_id TEXT NOT NULL,
|
||||
value TEXT NOT NULL,
|
||||
type TEXT NOT NULL CHECK (type IN ('text', 'markdown', 'link')),
|
||||
html_content TEXT NOT NULL,
|
||||
original_template TEXT,
|
||||
type TEXT NOT NULL CHECK (type IN ('text', 'link')),
|
||||
created_at INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
||||
updated_at INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
||||
last_edited_by TEXT DEFAULT 'system' NOT NULL,
|
||||
@@ -32,7 +33,8 @@ CREATE TABLE IF NOT EXISTS content_versions (
|
||||
version_id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
content_id TEXT NOT NULL,
|
||||
site_id TEXT NOT NULL,
|
||||
value TEXT NOT NULL,
|
||||
html_content TEXT NOT NULL,
|
||||
original_template TEXT,
|
||||
type TEXT NOT NULL,
|
||||
created_at INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
||||
created_by TEXT DEFAULT 'system' NOT NULL
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.30.0
|
||||
// source: versions.sql
|
||||
|
||||
package sqlite
|
||||
@@ -11,23 +11,25 @@ import (
|
||||
)
|
||||
|
||||
const createContentVersion = `-- name: CreateContentVersion :exec
|
||||
INSERT INTO content_versions (content_id, site_id, value, type, created_by)
|
||||
VALUES (?1, ?2, ?3, ?4, ?5)
|
||||
INSERT INTO content_versions (content_id, site_id, html_content, original_template, type, created_by)
|
||||
VALUES (?1, ?2, ?3, ?4, ?5, ?6)
|
||||
`
|
||||
|
||||
type CreateContentVersionParams struct {
|
||||
ContentID string `json:"content_id"`
|
||||
SiteID string `json:"site_id"`
|
||||
Value string `json:"value"`
|
||||
Type string `json:"type"`
|
||||
CreatedBy string `json:"created_by"`
|
||||
ContentID string `json:"content_id"`
|
||||
SiteID string `json:"site_id"`
|
||||
HtmlContent string `json:"html_content"`
|
||||
OriginalTemplate sql.NullString `json:"original_template"`
|
||||
Type string `json:"type"`
|
||||
CreatedBy string `json:"created_by"`
|
||||
}
|
||||
|
||||
func (q *Queries) CreateContentVersion(ctx context.Context, arg CreateContentVersionParams) error {
|
||||
_, err := q.db.ExecContext(ctx, createContentVersion,
|
||||
arg.ContentID,
|
||||
arg.SiteID,
|
||||
arg.Value,
|
||||
arg.HtmlContent,
|
||||
arg.OriginalTemplate,
|
||||
arg.Type,
|
||||
arg.CreatedBy,
|
||||
)
|
||||
@@ -51,8 +53,8 @@ func (q *Queries) DeleteOldVersions(ctx context.Context, arg DeleteOldVersionsPa
|
||||
|
||||
const getAllVersionsForSite = `-- name: GetAllVersionsForSite :many
|
||||
SELECT
|
||||
cv.version_id, cv.content_id, cv.site_id, cv.value, cv.type, cv.created_at, cv.created_by,
|
||||
c.value as current_value
|
||||
cv.version_id, cv.content_id, cv.site_id, cv.html_content, cv.original_template, cv.type, cv.created_at, cv.created_by,
|
||||
c.html_content as current_html_content
|
||||
FROM content_versions cv
|
||||
LEFT JOIN content c ON cv.content_id = c.id AND cv.site_id = c.site_id
|
||||
WHERE cv.site_id = ?1
|
||||
@@ -66,14 +68,15 @@ type GetAllVersionsForSiteParams struct {
|
||||
}
|
||||
|
||||
type GetAllVersionsForSiteRow struct {
|
||||
VersionID int64 `json:"version_id"`
|
||||
ContentID string `json:"content_id"`
|
||||
SiteID string `json:"site_id"`
|
||||
Value string `json:"value"`
|
||||
Type string `json:"type"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
CreatedBy string `json:"created_by"`
|
||||
CurrentValue sql.NullString `json:"current_value"`
|
||||
VersionID int64 `json:"version_id"`
|
||||
ContentID string `json:"content_id"`
|
||||
SiteID string `json:"site_id"`
|
||||
HtmlContent string `json:"html_content"`
|
||||
OriginalTemplate sql.NullString `json:"original_template"`
|
||||
Type string `json:"type"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
CreatedBy string `json:"created_by"`
|
||||
CurrentHtmlContent sql.NullString `json:"current_html_content"`
|
||||
}
|
||||
|
||||
func (q *Queries) GetAllVersionsForSite(ctx context.Context, arg GetAllVersionsForSiteParams) ([]GetAllVersionsForSiteRow, error) {
|
||||
@@ -89,11 +92,12 @@ func (q *Queries) GetAllVersionsForSite(ctx context.Context, arg GetAllVersionsF
|
||||
&i.VersionID,
|
||||
&i.ContentID,
|
||||
&i.SiteID,
|
||||
&i.Value,
|
||||
&i.HtmlContent,
|
||||
&i.OriginalTemplate,
|
||||
&i.Type,
|
||||
&i.CreatedAt,
|
||||
&i.CreatedBy,
|
||||
&i.CurrentValue,
|
||||
&i.CurrentHtmlContent,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -109,7 +113,7 @@ func (q *Queries) GetAllVersionsForSite(ctx context.Context, arg GetAllVersionsF
|
||||
}
|
||||
|
||||
const getContentVersion = `-- name: GetContentVersion :one
|
||||
SELECT version_id, content_id, site_id, value, type, created_at, created_by
|
||||
SELECT version_id, content_id, site_id, html_content, original_template, type, created_at, created_by
|
||||
FROM content_versions
|
||||
WHERE version_id = ?1
|
||||
`
|
||||
@@ -121,7 +125,8 @@ func (q *Queries) GetContentVersion(ctx context.Context, versionID int64) (Conte
|
||||
&i.VersionID,
|
||||
&i.ContentID,
|
||||
&i.SiteID,
|
||||
&i.Value,
|
||||
&i.HtmlContent,
|
||||
&i.OriginalTemplate,
|
||||
&i.Type,
|
||||
&i.CreatedAt,
|
||||
&i.CreatedBy,
|
||||
@@ -130,7 +135,7 @@ func (q *Queries) GetContentVersion(ctx context.Context, versionID int64) (Conte
|
||||
}
|
||||
|
||||
const getContentVersionHistory = `-- name: GetContentVersionHistory :many
|
||||
SELECT version_id, content_id, site_id, value, type, created_at, created_by
|
||||
SELECT version_id, content_id, site_id, html_content, original_template, type, created_at, created_by
|
||||
FROM content_versions
|
||||
WHERE content_id = ?1 AND site_id = ?2
|
||||
ORDER BY created_at DESC
|
||||
@@ -156,7 +161,8 @@ func (q *Queries) GetContentVersionHistory(ctx context.Context, arg GetContentVe
|
||||
&i.VersionID,
|
||||
&i.ContentID,
|
||||
&i.SiteID,
|
||||
&i.Value,
|
||||
&i.HtmlContent,
|
||||
&i.OriginalTemplate,
|
||||
&i.Type,
|
||||
&i.CreatedAt,
|
||||
&i.CreatedBy,
|
||||
|
||||
Reference in New Issue
Block a user