Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README - added a section about inspection #26

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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=
Loading