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

atlasexec: update schema payload #93

Merged
merged 1 commit into from
Sep 17, 2024
Merged
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
13 changes: 9 additions & 4 deletions atlasexec/atlas_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"encoding/json"
"fmt"
"time"

"ariga.io/atlas/sql/migrate"
)

type (
Expand Down Expand Up @@ -179,10 +181,13 @@ type (
}
// SchemaPlanFile is a JSON representation of a schema plan file.
SchemaPlanFile struct {
Name string `json:"Name,omitempty"` // Name of the plan.
FromHash string `json:"FromHash,omitempty"` // Hash of the 'from' realm.
ToHash string `json:"ToHash,omitempty"` // Hash of the 'to' realm.
Migration string `json:"Migration,omitempty"` // Migration SQL.
Name string `json:"Name,omitempty"` // Name of the plan.
FromHash string `json:"FromHash,omitempty"` // Hash of the 'from' realm.
FromDesc string `json:"FromDesc,omitempty"` // Optional description of the 'from' state.
ToHash string `json:"ToHash,omitempty"` // Hash of the 'to' realm.
ToDesc string `json:"ToDesc,omitempty"` // Optional description of the 'to' state.
Migration string `json:"Migration,omitempty"` // Migration SQL.
Stmts []*migrate.Stmt `json:"Stmts,omitempty"` // Statements in the migration (available only in the JSON output).
// registry only fields.
URL string `json:"URL,omitempty"` // URL of the plan in Atlas format.
Link string `json:"Link,omitempty"` // Link to the plan in the registry.
Expand Down
Loading