Skip to content

Commit bba0f62

Browse files
committed
cmd/atlas/internal/sqlparse: move parsers out
1 parent 0f5d486 commit bba0f62

File tree

6 files changed

+42
-1260
lines changed

6 files changed

+42
-1260
lines changed

cmd/atlas/internal/sqlparse/pgparse/pgparse.go

Lines changed: 0 additions & 215 deletions
This file was deleted.

cmd/atlas/internal/sqlparse/pgparse/pgparse_oss.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,22 @@
77
package pgparse
88

99
import (
10+
"errors"
11+
12+
"ariga.io/atlas/sql/migrate"
1013
"ariga.io/atlas/sql/schema"
11-
pgquery "github.com/pganalyze/pg_query_go/v5"
1214
)
1315

14-
func FixAlterTable(_ string, _ *pgquery.AlterTableStmt, changes schema.Changes) (schema.Changes, error) {
16+
type Parser struct{}
17+
18+
func (*Parser) ColumnFilledBefore([]*migrate.Stmt, *schema.Table, *schema.Column, int) (bool, error) {
19+
return false, errors.New("unimplemented")
20+
}
21+
22+
func (*Parser) CreateViewAfter([]*migrate.Stmt, string, string, int) (bool, error) {
23+
return false, errors.New("unimplemented")
24+
}
25+
26+
func (*Parser) FixChange(_ migrate.Driver, _ string, changes schema.Changes) (schema.Changes, error) {
1527
return changes, nil // Unimplemented.
1628
}

0 commit comments

Comments
 (0)