good morning!!!!

Skip to content
Snippets Groups Projects
Commit 67ee382e authored by José Carlos Nieto's avatar José Carlos Nieto
Browse files

PrimaryKeys in schema is now an array of strings.

parent 82041b2b
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ type DatabaseSchema struct { ...@@ -32,7 +32,7 @@ type DatabaseSchema struct {
// TableSchema represents a single table. // TableSchema represents a single table.
type TableSchema struct { type TableSchema struct {
PrimaryKey string PrimaryKey []string
Alias string Alias string
Columns []string Columns []string
} }
...@@ -50,6 +50,7 @@ func NewDatabaseSchema() *DatabaseSchema { ...@@ -50,6 +50,7 @@ func NewDatabaseSchema() *DatabaseSchema {
func (d *DatabaseSchema) AddTable(name string) { func (d *DatabaseSchema) AddTable(name string) {
if _, ok := d.TableInfo[name]; !ok { if _, ok := d.TableInfo[name]; !ok {
table := new(TableSchema) table := new(TableSchema)
table.PrimaryKey = []string{}
table.Columns = []string{} table.Columns = []string{}
d.TableInfo[name] = table d.TableInfo[name] = table
d.Tables = append(d.Tables, name) d.Tables = append(d.Tables, name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment