Skip to content

Commit 6723465

Browse files
authored
feat!: Remove unused table create options (#57)
I was using this option to set the primary keys on my tables: https://github.com/erezrokah/cloudquery/blob/28f7db10eadd834769663dc1e8243f04469b0132/plugins/source/azure/codegen/recipes/base.go#L206 to realize it stopped working and I should set it on columns instead ---
1 parent 14d9728 commit 6723465

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

codegen/table.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ type TableDefinition struct {
2020
Multiplex string
2121
PostResourceResolver string
2222
PreResourceResolver string
23-
Options schema.TableCreationOptions
2423
nameTransformer func(string) string
2524
skipFields []string
2625
overrideColumns ColumnDefinitions

schema/table.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ type Table struct {
5050
// PreResourceResolver is called before all columns are resolved but after Resource is created. The ordering of resolvers is:
5151
// (Table) Resolver → PreResourceResolver → ColumnResolvers → PostResourceResolver
5252
PreResourceResolver RowResolver `json:"-"`
53-
// Options allow modification of how the table is defined when created
54-
Options TableCreationOptions `json:"options"`
5553

5654
// IgnoreInTests is used to exclude a table from integration tests.
5755
// By default, integration tests fetch all resources from cloudquery's test account, and verify all tables
@@ -69,12 +67,6 @@ type Table struct {
6967
columnsMap map[string]int
7068
}
7169

72-
// TableCreationOptions allow modifying how table is created such as defining primary keys, indices, foreign keys and constraints.
73-
type TableCreationOptions struct {
74-
// List of columns to set as primary keys. If this is empty, a random unique ID is generated.
75-
PrimaryKeys []string
76-
}
77-
7870
func (tt Tables) TableNames() []string {
7971
ret := []string{}
8072
for _, t := range tt {

0 commit comments

Comments
 (0)