Files
artcraft/_database/sql/migrations_squashed/uploaded_video_notes.sql
T
Brandon Thomas 7bccab83c8 schema
2026-06-19 14:38:16 -04:00

46 lines
1.4 KiB
SQL

-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
CREATE TABLE uploaded_video_notes (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-- Effective "primary key" (used internally for lookups and as a foreign key).
token VARCHAR(32) NOT NULL,
-- ========== SUBMISSION ==========
-- Original filename of the submitted clip, as provided by the user.
filename VARCHAR(512) DEFAULT NULL,
-- The model type the submitter claims this video is.
reported_model_type VARCHAR(32) DEFAULT NULL,
-- Free-form custom model name when the submitter's model isn't a known type.
reported_model_custom_name VARCHAR(64) DEFAULT NULL,
-- The website / platform the video was obtained from.
website VARCHAR(32) DEFAULT NULL,
-- Free-form website when it isn't a known option.
other_website VARCHAR(128) DEFAULT NULL,
-- Free-form comments from the submitter.
comments VARCHAR(1024) DEFAULT NULL,
-- ========== IP ADDRESS ==========
-- IP address that submitted the note. Wide enough for IPv4/IPv6.
comment_ip_address VARCHAR(40) NOT NULL,
-- ========== TIMESTAMPS ==========
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-- INDICES --
PRIMARY KEY (id),
UNIQUE KEY (token)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;