feat(postgres): added image urls to the database
This commit is contained in:
parent
a60805fccf
commit
aae7fc78e0
@ -57,6 +57,9 @@ CREATE TABLE "PostReference"
|
|||||||
post_id TEXT REFERENCES "Post" (id),
|
post_id TEXT REFERENCES "Post" (id),
|
||||||
source_id TEXT REFERENCES "Source" (id),
|
source_id TEXT REFERENCES "Source" (id),
|
||||||
url TEXT NOT NULL UNIQUE,
|
url TEXT NOT NULL UNIQUE,
|
||||||
|
full_file_url TEXT,
|
||||||
|
preview_file_url TEXT,
|
||||||
|
sample_file_url TEXT,
|
||||||
source_post_id TEXT,
|
source_post_id TEXT,
|
||||||
PRIMARY KEY (post_id, source_id)
|
PRIMARY KEY (post_id, source_id)
|
||||||
);
|
);
|
||||||
|
@ -5,4 +5,7 @@ type PostReference struct {
|
|||||||
SourceID string `gorm:"primaryKey"`
|
SourceID string `gorm:"primaryKey"`
|
||||||
URL string `gorm:"not null;unique"`
|
URL string `gorm:"not null;unique"`
|
||||||
SourcePostID string
|
SourcePostID string
|
||||||
|
FullFileURL string
|
||||||
|
PreviewFileURL string
|
||||||
|
SampleFileURL string
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user