diff --git a/README.md b/README.md index 7bc8f18..d9def19 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/tests/migrations/postgresql/20240123150442.sql b/tests/migrations/postgresql/20241107115133.sql similarity index 92% rename from tests/migrations/postgresql/20240123150442.sql rename to tests/migrations/postgresql/20241107115133.sql index 1d277e4..1334c3d 100644 --- a/tests/migrations/postgresql/20240123150442.sql +++ b/tests/migrations/postgresql/20241107115133.sql @@ -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"); @@ -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"); diff --git a/tests/migrations/postgresql/atlas.sum b/tests/migrations/postgresql/atlas.sum index 3037927..11258e3 100644 --- a/tests/migrations/postgresql/atlas.sum +++ b/tests/migrations/postgresql/atlas.sum @@ -1,2 +1,2 @@ -h1:wPrdpJIc9fRclW3cMGAqDMqK22dhVkEahLLae2v2Jp4= -20240123150442.sql h1:OssKCxrsi6AnIM5iRKN/lrbHEzgehNTrR0t+AIefm1I= +h1:KSSc+s5Me2aoCePVUmYORCYmPXhWS0zQLWIT5yBrC2U= +20241107115133.sql h1:j4q281AhAkMNqBIM1PxuB6g/5HVRyWUymZtsFp4mu/c=