rust-adventure / thisweekinbevy

This Week, in the Bevy Ecosystem
MIT License
98 stars 6 forks source link

CrateRelease schema updates #11

Open ChristopherBiscardi opened 7 months ago

ChristopherBiscardi commented 7 months ago

After writing a few issues, its clear that crate_releases have some additional metadata that could be structured and displayed.

Its nice to be able to tell people what they're clicking on: a changelog, a written post, a video on a particular platform, a discord link, etc. This is mostly done through icons and wording on the frontend. While we could have a generic "urls" field and do detection by url domain, that is error prone and if it can be structured it should so that links show up in the same locations all the time.

schema

Most crate releases have

Some additionally have

current schema

currently there's a main url which isn't particularly well-defined other than being the "main link", and a discord_url. This leaves crates.io, changelog, and release_post as potential additions.

Field Type Null Key Default Extra
id varbinary(16) NO PRI NULL
title varchar(500) NO NULL
url varchar(500) NO
discord_url varchar(500) NO
submitted_by varchar(50) YES NULL
posted_date date YES NULL
description varchar(5000) NO
created_at timestamp NO CURRENT_TIMESTAMP DEFAULT_GENERATED
updated_at timestamp NO CURRENT_TIMESTAMP DEFAULT_GENERATED on update CURRENT_TIMESTAMP