Skip to content

Commit 433c263

Browse files
committed
Changes to support UUID
1 parent a1c7e9a commit 433c263

File tree

1,123 files changed

+782
-488187
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,123 files changed

+782
-488187
lines changed

Gopkg.lock

Lines changed: 0 additions & 457 deletions
This file was deleted.

Gopkg.toml

Lines changed: 0 additions & 43 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ export JWT="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBY2NvdW50SUQiOjF9.GsXyFDDARj
128128
curl -H "Authorization: Bearer $JWT" http://localhost:8080/v1/regions
129129
{}
130130
```
131+
Add a CloudProvider:
132+
```bash
133+
curl -H "Authorization: Bearer $JWT" http://localhost:8080/v1/cloud_providers -d '{"name": "aws"}'
134+
```
131135
Now let's add a Region:
132136
```sh
133137
curl -H "Authorization: Bearer $JWT" http://localhost:8080/v1/regions -d '{"name": "us-west-1", "description": "sample..."}'

db/migrations/00002_cloud_providers.up.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
CREATE TABLE cloud_providers (
3-
id serial primary key,
3+
id text primary key,
44
account_id text,
55
created_at timestamptz DEFAULT current_timestamp,
66
updated_at timestamptz DEFAULT NULL,

db/migrations/00003_regions.up.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

22
CREATE TABLE regions (
3-
id serial primary key,
3+
id text primary key,
44
account_id text,
55
created_at timestamptz DEFAULT current_timestamp,
66
updated_at timestamptz DEFAULT NULL,
77
name text DEFAULT NULL,
88
description text DEFAULT NULL,
9-
cloud_provider_id int REFERENCES cloud_providers(id) ON DELETE CASCADE
9+
cloud_provider_id text REFERENCES cloud_providers(id) ON DELETE CASCADE
1010

1111
);
1212

db/migrations/00004_networks.up.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

22
CREATE TABLE networks (
3-
id serial primary key,
3+
id text primary key,
44
account_id text,
55
created_at timestamptz DEFAULT current_timestamp,
66
updated_at timestamptz DEFAULT NULL,
77
name text DEFAULT NULL,
88
description text DEFAULT NULL,
9-
region_id int REFERENCES regions(id) ON DELETE CASCADE
9+
region_id text REFERENCES regions(id) ON DELETE CASCADE
1010

1111
);
1212

db/migrations/00005_lifecycles.up.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

22
CREATE TABLE lifecycles (
3-
id serial primary key,
3+
id text primary key,
44
account_id text,
55
created_at timestamptz DEFAULT current_timestamp,
66
updated_at timestamptz DEFAULT NULL,
77
name text DEFAULT NULL,
88
description text DEFAULT NULL,
99
config_yaml text DEFAULT NULL,
10-
lifecycle_id int REFERENCES lifecycles(id) ON DELETE CASCADE
10+
lifecycle_id text REFERENCES lifecycles(id) ON DELETE CASCADE
1111
);
1212

1313
CREATE TRIGGER lifecycles_updated_at

db/migrations/00006_environments.up.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

22
CREATE TABLE environments (
3-
id serial primary key,
3+
id text primary key,
44
account_id text,
55
created_at timestamptz DEFAULT current_timestamp,
66
updated_at timestamptz DEFAULT NULL,
77
name text DEFAULT NULL,
88
description text DEFAULT NULL,
99
config_yaml text DEFAULT NULL,
10-
lifecycle_id int REFERENCES lifecycles(id) ON DELETE CASCADE
10+
lifecycle_id text REFERENCES lifecycles(id) ON DELETE CASCADE
1111
);
1212

1313
CREATE TRIGGER environments_updated_at

db/migrations/00007_applications.up.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
CREATE TABLE applications (
3-
id serial primary key,
3+
id text primary key,
44
account_id text,
55
created_at timestamptz DEFAULT current_timestamp,
66
updated_at timestamptz DEFAULT NULL,

db/migrations/00008_chart_versions.up.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
CREATE TABLE chart_versions (
3-
id serial primary key,
3+
id text primary key,
44
account_id text,
55
created_at timestamptz DEFAULT current_timestamp,
66
updated_at timestamptz DEFAULT NULL,
@@ -9,7 +9,7 @@ CREATE TABLE chart_versions (
99
repo text DEFAULT NULL,
1010
version text DEFAULT NULL,
1111
chart_store jsonb NOT NULL DEFAULT '{}',
12-
application_id int REFERENCES applications(id) ON DELETE CASCADE
12+
application_id text REFERENCES applications(id) ON DELETE CASCADE
1313
);
1414

1515
CREATE TRIGGER chart_versions_updated_at

0 commit comments

Comments
 (0)