Skip to content

Commit

Permalink
README - added a section about inspection (#26)
Browse files Browse the repository at this point in the history
Co-authored-by: Ronen Lubin <[email protected]>
  • Loading branch information
dorav and ronenlu authored Nov 7, 2024
1 parent e910fab commit 45cd7d2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ env "django" {

### Usage

### Inspect

You can use the `atlas schema inspect` command to visualize your Django schema in Atlas Cloud.

```bash
atlas schema inspect -w --env django --url env://src
```

![inspect example](https://atlasgo.io/u/cloud/images/erd-example-v1.png)

#### Apply

You can use the `atlas schema apply` command to plan and apply a migration of your database to your current Django schema.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CREATE TABLE "public"."app1_album" (
"num_stars" integer NOT NULL,
"artist_id" bigint NOT NULL,
PRIMARY KEY ("id"),
CONSTRAINT "app1_album_artist_id_aed0987a_fk_app1_musician_id" FOREIGN KEY ("artist_id") REFERENCES "public"."app1_musician" ("id") ON UPDATE NO ACTION ON DELETE NO ACTION
CONSTRAINT "app1_album_artist_id_aed0987a_fk_app1_musician_id" FOREIGN KEY ("artist_id") REFERENCES "public"."app1_musician" ("id") ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED
);
-- Create index "app1_album_artist_id_aed0987a" to table: "app1_album"
CREATE INDEX "app1_album_artist_id_aed0987a" ON "public"."app1_album" ("artist_id");
Expand All @@ -34,7 +34,7 @@ CREATE TABLE "public"."app2_blog" (
"num_stars" integer NOT NULL,
"author_id" bigint NOT NULL,
PRIMARY KEY ("id"),
CONSTRAINT "app2_blog_author_id_1675e606_fk_app2_user_id" FOREIGN KEY ("author_id") REFERENCES "public"."app2_user" ("id") ON UPDATE NO ACTION ON DELETE NO ACTION
CONSTRAINT "app2_blog_author_id_1675e606_fk_app2_user_id" FOREIGN KEY ("author_id") REFERENCES "public"."app2_user" ("id") ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED
);
-- Create index "app2_blog_author_id_1675e606" to table: "app2_blog"
CREATE INDEX "app2_blog_author_id_1675e606" ON "public"."app2_blog" ("author_id");
4 changes: 2 additions & 2 deletions tests/migrations/postgresql/atlas.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
h1:wPrdpJIc9fRclW3cMGAqDMqK22dhVkEahLLae2v2Jp4=
20240123150442.sql h1:OssKCxrsi6AnIM5iRKN/lrbHEzgehNTrR0t+AIefm1I=
h1:KSSc+s5Me2aoCePVUmYORCYmPXhWS0zQLWIT5yBrC2U=
20241107115133.sql h1:j4q281AhAkMNqBIM1PxuB6g/5HVRyWUymZtsFp4mu/c=

0 comments on commit 45cd7d2

Please sign in to comment.