atlas-action icon indicating copy to clipboard operation
atlas-action copied to clipboard

chore: codegen for doc

Open giautm opened this issue 1 year ago • 4 comments

giautm avatar Jan 01 '25 17:01 giautm

Atlas Lint Report

Analyzed migrations

StatusStepResultDiagnostics
Detect New Migration FilesFound 0 new migration files (from 0 total)
Replay Migration FilesLoaded 0 changes on dev database
Connect your project to Atlas Cloud to get more safety checks

Migrations automatically reviewed by Atlas

github-actions[bot] avatar Jan 01 '25 17:01 github-actions[bot]

Atlas Lint Report

Analyzed migrations2

StatusStepResultDiagnostics
Detect New Migration FilesFound 0 new migration files (from 0 total)
Replay Migration FilesLoaded 0 changes on dev database
Connect your project to Atlas Cloud to get more safety checks

Migrations automatically reviewed by Atlas

github-actions[bot] avatar Jan 01 '25 17:01 github-actions[bot]

atlas migrate lint on atlasaction/testdata/migrations_destructive

Status Step Result
1 new migration file detected 20230925192914.sql
ERD and visual diff generated View Visualization
Analyze 20230925192914.sql
1 reports were found in analysis
Destructive changes detected
Dropping table "t1" (DS102)
Read the full linting report on Atlas Cloud

github-actions[bot] avatar Jan 01 '25 17:01 github-actions[bot]

Atlas detected changes to the desired schema

Migration Plan for atlas-actionView on Atlas Cloud

-- Create "t1" table
CREATE TABLE `t1` (
  `c1` integer NOT NULL
);
-- Create "t2" table
CREATE TABLE `t2` (
  `c1` integer NOT NULL
);
-- Create "t3" table
CREATE TABLE `t3` (
  `c1` integer NOT NULL,
  `c2` integer NOT NULL
);

Atlas lint results

Status Step Result
Detect schema changes3 new statements detected
No issues found

📝 Steps to edit this migration plan

1. Run the following command to pull the generated plan to your local workstation:

atlas schema plan pull --url "atlas://atlas-action/plans/pr-291-R1cGcSfo" > pr-291-R1cGcSfo.plan.hcl

2. Open pr-291-R1cGcSfo in your editor and modify it as needed. Note that the result of the plan should align the database with the desired state. Otherwise, Atlas will report a schema drift.

3. Push the updated plan to the registry using the following command:

atlas schema plan push --pending --file pr-291-R1cGcSfo.plan.hcl

4. Re-trigger the schema/plan action to update this comment:

gh run rerun 16101000842

github-actions[bot] avatar Jan 01 '25 17:01 github-actions[bot]

atlas schema lint on file://schema.lt.hcl

Status Rule Result
Naming violations detected Table "t1" violates the naming policy (NM102) schema.lt.hcl:1:1
Table "t2" violates the naming policy (NM102) schema.lt.hcl:1:1
Primary-key-required rule violated All tables must have a primary key
Table t1 must have a primary key schema.lt.hcl:3:1
Table t2 must have a primary key schema.lt.hcl:10:1
Primary-key-required rule violated All tables must have a primary key
Table t1 must have a primary key schema.lt.hcl:3:1
Table t2 must have a primary key schema.lt.hcl:10:1

github-actions[bot] avatar Jun 26 '25 16:06 github-actions[bot]

atlas schema lint on sqlite://schemarule.db

Status Rule Result
Naming violations detected Table "main.T1" violates the naming policy (NM102)
Primary-key-required rule violated All tables must have a primary key
Table T1 must have a primary key
Primary-key-required rule violated All tables must have a primary key
Table T1 must have a primary key

github-actions[bot] avatar Jun 26 '25 16:06 github-actions[bot]

Atlas detected changes to the desired schema

Migration Plan (View on Atlas Cloud)

-- Create "t1" table
CREATE TABLE `t1` (
  `c1` integer NOT NULL
);
-- Create "t2" table
CREATE TABLE `t2` (
  `c1` integer NOT NULL
);
-- Create "t3" table
CREATE TABLE `t3` (
  `c1` integer NOT NULL,
  `c2` integer NOT NULL
);

Atlas lint results

Status Step Result
Detect schema changes3 new statements detected
No issues found

📝 Steps to edit this migration plan

1. Run the following command to pull the generated plan to your local workstation:

atlas schema plan pull --url "atlas://atlas-action/plans/pr-406-R1cGcSfo" > pr-406-R1cGcSfo.plan.hcl

2. Open pr-406-R1cGcSfo in your editor and modify it as needed. Note that the result of the plan should align the database with the desired state. Otherwise, Atlas will report a schema drift.

3. Push the updated plan to the registry using the following command:

atlas schema plan push --pending --file pr-406-R1cGcSfo.plan.hcl

4. Re-trigger the schema/plan action to update this comment:

gh run rerun 15906776072

github-actions[bot] avatar Jun 26 '25 16:06 github-actions[bot]