Set up command to import data from Scryfall
This commit is contained in:
parent
896a6666a9
commit
256b6e96f2
|
@ -1,2 +1,4 @@
|
||||||
dbup:
|
dbup:
|
||||||
go run cmd/database/main.go
|
go run cmd/database/main.go
|
||||||
|
importdata: dbup
|
||||||
|
go run cmd/importdata/main.go
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
// Import colors
|
||||||
|
// Import sets
|
||||||
|
// Import keywords
|
||||||
|
// Import formats
|
||||||
|
// Import artists
|
||||||
|
// Import gamepieces and printings
|
||||||
|
fmt.Println("Hello, world from importdata")
|
||||||
|
}
|
|
@ -44,11 +44,6 @@ CREATE TABLE IF NOT EXISTS Color (
|
||||||
Name VARCHAR(5) NOT NULL,
|
Name VARCHAR(5) NOT NULL,
|
||||||
Abbreviation VARCHAR(1) NOT NULL
|
Abbreviation VARCHAR(1) NOT NULL
|
||||||
);
|
);
|
||||||
INSERT INTO Color (Name, Abbreviation) VALUES ("White", "W");
|
|
||||||
INSERT INTO Color (Name, Abbreviation) VALUES ("Blue", "U");
|
|
||||||
INSERT INTO Color (Name, Abbreviation) VALUES ("Black", "B");
|
|
||||||
INSERT INTO Color (Name, Abbreviation) VALUES ("Red", "R");
|
|
||||||
INSERT INTO Color (Name, Abbreviation) VALUES ("Green", "G");
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS GamepieceColor (
|
CREATE TABLE IF NOT EXISTS GamepieceColor (
|
||||||
ColorId INT,
|
ColorId INT,
|
||||||
|
@ -106,6 +101,7 @@ CREATE TABLE IF NOT EXISTS ExpansionSet (
|
||||||
SetCode VARCHAR(4) NOT NULL,
|
SetCode VARCHAR(4) NOT NULL,
|
||||||
Name VARCHAR(40) NOT NULL,
|
Name VARCHAR(40) NOT NULL,
|
||||||
Digital BOOLEAN NOT NULL,
|
Digital BOOLEAN NOT NULL,
|
||||||
|
SetType VARCHAR(20) NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS Artist (
|
CREATE TABLE IF NOT EXISTS Artist (
|
||||||
|
|
Loading…
Reference in New Issue