ajohnson10209 / CodeacademyBuildWebAPICapstone

Capstone project from the course Build Web APIs From Scratch. I completed this course on 3-25-2019
0 stars 0 forks source link

Important - Tips to pass Default ID Test #1

Open cc-prj-review-alf opened 5 years ago

cc-prj-review-alf commented 5 years ago

https://github.com/ajohnson10209/CodeacademyBuildWebAPICapstone/blob/master/capstone-project-2-expresso/migration.js#L12

Screen Shot 2019-03-26 at 6 12 53 PM

Employees Table Test is Failing at the Migration.js file. What I recommend for this is to change the syntax of your db.run function

    db.run(`
        create table if not exists Employee
        (
            id                  integer     primary key,
            name                text        not null,
            position            text        not null,
            wage                integer     not null,
            is_current_employee integer     not null default 1
        )
    `);

Add the words "not null" before default 1

ajohnson10209 commented 5 years ago

Thanks, this was really confusing.