© Christopher Pitt 2018
Christopher PittThe Definitive Guide to AdonisJshttps://doi.org/10.1007/978-1-4842-3390-0_9

9. Databases

Christopher Pitt1 
(1)
Cape Town, Western Cape, South Africa
 

In the previous chapter, we started to organize our code into controllers and to reuse code with middleware. I mentioned we’d be seeing authentication and session middleware just as soon as we started working with the database. That time has come.

In this chapter, we’re going to learn about schema migrations. We’ll use these to create a code blueprint of the database structures we want our application to use. Then we’ll start to write and read from these structures by using SQL (or Structured Query Language) queries.

Finally, we’ll take a look at Lucid, which is ...

Get The Definitive Guide to AdonisJs: Building Node.js Applications with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.