Skip to content
Open
Show file tree
Hide file tree
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
Binary file added .DS_Store
Binary file not shown.
46 changes: 46 additions & 0 deletions data/schema.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Lakewoods135';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change your password :)

flush privileges;

CREATE DATABASE Pokedex;
use Pokedex;
CREATE TABLE POKEMON_Card (
Pokemon_ID INT Primary KEY NOT NULL,
Pokemon_Type VARCHAR(255),
Pokemon_Name VARCHAR(255),
Pokemon_Color VARCHAR(255),
);

CREATE TABLE Types(
types_ID INT Primary KEY NOT NULL,
types_name VARCHAR(255)
);
CREATE TABLE Poke_Type(
PokeType_ID INT Primary KEY NOT NULL,
Pokemon_ID INT NOT NULL,
FOREIGN KEY (Pokemon_ID) REFERENCES POKEMON_Card (Pokemon_ID),
types_ID INT NOT NULL,
FOREIGN KEY (types_ID) REFERENCES Types (types_ID)
)ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Lakewoods135';
flush privileges;

CREATE DATABASE Pokedex;
use Pokedex;
CREATE TABLE POKEMON_Card (
Pokemon_ID INT Primary KEY NOT NULL,
Pokemon_Type VARCHAR(255),
Pokemon_Name VARCHAR(255),
Pokemon_Color VARCHAR(255),
);

CREATE TABLE Types(
types_ID INT Primary KEY NOT NULL,
types_name VARCHAR(255)
);
CREATE TABLE Poke_Type(
PokeType_ID INT Primary KEY NOT NULL,
Pokemon_ID INT NOT NULL,
FOREIGN KEY (Pokemon_ID) REFERENCES POKEMON_Card (Pokemon_ID),
types_ID INT NOT NULL,
FOREIGN KEY (types_ID) REFERENCES Types (types_ID)
);
INSERT INTO POKEMON_Card (Pokemon_ID, Pokemon_Type, Pokemon_Name, Pokemon_Color) VALUES (1, 'Grass', 'BLue', 'Blueberry');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you have the same code twice, you only need the three tables

11 changes: 0 additions & 11 deletions index.js

This file was deleted.

Loading