def create_db(conn):
    """Add a database named titanic to repo.
    Creates types for:
        sex: 'male', 'female' and
        pclass: '1', '2', '3'
    """
    create_enums = '''
    CREATE TYPE sex AS ENUM ('male', 'female');
    CREATE TYPE pclass AS ENUM ('1', '2', '3');
    '''
    curs = conn.cursor()
    curs.execute(create_enums)
    conn.commit()

    create_table = '''
    DROP TABLE titanic;
    CREATE TABLE titanic (
    id SERIAL PRIMARY KEY,
    survival BOOL,
    pclass pclass,
    name VARCHAR (255),
    sex sex,
    age FLOAT,
    sibsp INT,
    parch INT,
    fare FLOAT);
    '''

    curs = conn.cursor()
    curs.execute(create_table)
    conn.commit()
    return conn