CREATE TABLE Songs ( id UUID DEFAULT uuid_generate_v4() PRIMARY KEY, songName VARCHAR(255) NOT NULL, artist VARCHAR(255) NOT NULL, featuredArtist VARCHAR(255), fileExtension VARCHAR(255) DEFAULT 'mp3', "createdAt" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP );
CREATE TABLE SongStats (id UUID DEFAULT uuid_generate_v4() PRIMARY KEY, fileSize BIGINT DEFAULT 0 NOT NULL, downloads INT DEFAULT 0 NOT NULL, plays INT DEFAULT 0 NOT NULL, likes INT DEFAULT 0 NOT NULL, songId UUID, FOREIGN KEY(songId) REFERENCES Songs(id));
CREATE TABLE Artworks (id UUID DEFAULT uuid_generate_v4() PRIMARY KEY, fileExtension VARCHAR(255) DEFAULT 'jpg', songId UUID, FOREIGN KEY(songId) REFERENCES Songs(id));
create table OldUploadIDs(id VARCHAR(255) primary key, songId UUID, FOREIGN KEY(songId) REFERENCES Songs(id));

INSERT INTO Songs (songName, artist, featuredArtist, fileExtension) VALUES ('New Song', 'John Doe', 'Jane Doe', 'mp3');
INSERT INTO SongStats (songId) VALUES ('54e694ce-6003-46e6-9cfd-b1cf0fe9d332');
INSERT INTO Artworks (fileExtension, songId) VALUES ('jpg', '54e694ce-6003-46e6-9cfd-b1cf0fe9d332');
INSERT INTO OldUploadIDs(id, songId) VALUE ('id', 'new-uuid')

create extension "uuid-ossp";
select uuid_generate_v4();