Add DDL for new database schema
Context
Related to #206 (closed) and #104 (closed).
This MR iterates on the alternative schema proposed on gitlab-com/www-gitlab-com!60918 (merged). Minor changes were implemented, including reordering columns for optimal storage efficiency, adding or renaming constraints or adding missing columns.
Out of scope
The proposed DDL doesn't include any custom indexes. These should be added once we settle on the required queries to serve API requests, being discussed in !358 (merged). It also does not include any functions or triggers for GC, these will be considered later.
Edited by João Pereira