CREATE TABLE IF NOT EXISTS Heroes (
    h_id int(10) unsigned NOT NULL AUTO_INCREMENT,
    h_hname varchar(255), 
    h_email varchar(255),
    h_password varchar(255),
    h_fname varchar(255),
    h_lname varchar(255),
    PRIMARY KEY (h_id)
    );

    INSERT INTO Heroes (
        h_id,
        h_hname,
        h_email,
        h_password,
        h_fname,
        h_lname
    )
    VALUES
    (   NULL,
        'All Might',
        'allmight@allmight.com',
        'number1hero',
        'Toshinori',
        'Yagi'),
    (   NULL,
        'Deku',
        'mizuku@ua.edu',
        'password',
        'Izuku',
        'Midoriya');

    CREATE TABLE IF NOT EXISTS Posts (
        p_id int(10) unsigned NOT NULL AUTO_INCREMENT,
        ph_id int(10) unsigned NOT NULL, /*Foreign key: Hero ID*/
        p_text TEXT(511),
        PRIMARY KEY (p_id),
        FOREIGN KEY (ph_id) REFERENCES Heroes(h_id)
        );
        INSERT INTO Posts (
            p_id,
            ph_id,
            p_text
        )
        VALUES
        (   NULL,
            '1',
            'I am here!'
        ),
        (   NULL,
            '2',
            'All Might is the best!'
        );
/*
        CREATE VIEW HPost AS (
            SELECT h_id FROM Heroes
            WHERE h_id = ( 
                SELECT ph_id FROM Posts
            )
        );*/
