g1t/services/projects/migrations/0002_dependencies.sql
| 1 | -- One project using another: calling its API, consuming its package. A |
| 2 | -- dependency is declared in the UI or in the project's .g1t/project.yml, |
| 3 | -- which replaces the file's rows on every push to the default branch. |
| 4 | |
| 5 | CREATE TABLE dependencies ( |
| 6 | project_id TEXT NOT NULL, |
| 7 | depends_on_id TEXT NOT NULL, |
| 8 | -- The variable its builds and apps get with the other's address for the |
| 9 | -- same environment, such as API_URL; null for none. |
| 10 | alias TEXT, |
| 11 | -- ui or file. |
| 12 | source TEXT NOT NULL DEFAULT 'ui', |
| 13 | created_by TEXT NOT NULL, |
| 14 | created_at TEXT NOT NULL, |
| 15 | PRIMARY KEY (project_id, depends_on_id) |
| 16 | ); |
| 17 | CREATE INDEX dependencies_by_target ON dependencies (depends_on_id); |