Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
'use strict'
module.exports = class Table {
static createUserTable() {
return `CREATE TABLE IF NOT EXISTS users
(id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT, email TEXT, pass TEXT);`
}
static createFileTable() {
return `CREATE TABLE IF NOT EXISTS files(
downloadId INTEGER PRIMARY KEY AUTOINCREMENT,
filePath TEXT,
fileName TEXT,
uploadDate TEXT,
senderEmail TEXT,
receiverEmail TEXT,
encryptedFileName TEXT,
FOREIGN KEY(senderEmail) REFERENCES users(username)
);`
}
}