Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const app = require('./server');
- const sqlite = require('sqlite3');
- const database = new sqlite.Database(process.env.TEST_DATABASE || './database.sqlite');
- db.serialize(() => {
- db.run(DROP TABLE IF EXISTS Artist);
- db.run(`CREATE TABLE IF NOT EXISTS Artist(
- id INTEGER PRIMARY KEY,
- name TEXT NOT NULL,
- date_of_birth TEXT NOT NULL,
- biography TEXT NOT NULL,
- is_currently_employed INTEGER DEFAULT 1
- );`);
- });
- db.serialize(() => {
- db.run(DROP TABLE IF EXISTS Series);
- db.run(`CREATE TABLE IF NOT EXISTS Series(
- id INTEGER PRIMARY KEY,
- name TEXT NOT NULL,
- description TEXT NOT NULL
- );`);
- });
Add Comment
Please, Sign In to add comment