dboehmer / coocook

👨‍🍳🦉 Web application for collecting recipes and making food plans
https://coocook.org/
Other
11 stars 2 forks source link

Refactor projects URLs to use ID or UUID as identifier rather than project name #87

Open dboehmer opened 6 years ago

dboehmer commented 6 years ago

When I designed the URL scheme for projects like /project/my-vacation for project My Vacation I used GitHub as role model. This doesn't seem to fit:

Instead we should mimic YouTube URLs like https://youtu.be/DLzxrzFCyOs:

Then URL should look like e.g. /project/A1b2z3/settings.

Pros:

Stackexchange Webapps: format of the YouTube video ID

dboehmer commented 5 years ago

note:

YouTube video ID is a 8 byte/2⁶⁴ integer encoded as base64 without padding characters.

The YouTube channel/playlist IDs are 16 byte/2¹²⁸ integers.

Standard SQL supports the BIGINT datatype which is 4 bytes 8 bytes large and allows values up to 2⁶⁴ = 18,446,744,073,709,551,615 (unsigned). This is supported both by SQLite, PostgreSQL and MariaDB. See https://en.wikipedia.org/wiki/Integer_(computer_science)

dboehmer commented 4 years ago

I just merged a branch into master that realized phase I of this migration. For now we use the database IDs in decimal format. I just couldn't decide for any other system. A sequence of decimal IDs is still much better than the user-provided natural strings that share the same namespace.

In a next step we can either

I am confident that we can manage to migrate from phase I to phase II smoothly.