Skip to content

Commit 4bf344f

Browse files
committed
update
1 parent 0119c23 commit 4bf344f

File tree

26 files changed

+7318
-36
lines changed

26 files changed

+7318
-36
lines changed
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
.env.test
60+
61+
# parcel-bundler cache (https://parceljs.org/)
62+
.cache
63+
64+
# next.js build output
65+
.next
66+
67+
# nuxt.js build output
68+
.nuxt
69+
70+
# vuepress build output
71+
.vuepress/dist
72+
73+
# Serverless directories
74+
.serverless/
75+
76+
# FuseBox cache
77+
.fusebox/
78+
79+
# DynamoDB Local files
80+
.dynamodb/
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Introduction to Relational Databases, SQL and Knex
2+
3+
In this project we will cover the basics of `Structure Query Language (SQL)`, `Relational Databases`, and `Knex.js Queries`.
4+
5+
## Prerequisites
6+
7+
- [SQLite Studio Installed](https://sqlitestudio.pl/index.rvt?act=download).
8+
9+
## Project Setup
10+
11+
- [ ] fork and clone this repository.
12+
- [ ] **CD into the folder** where you cloned **your fork**.
13+
- [ ] type `npm i` to download dependencies.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const knex = require('knex');
2+
3+
const config = require('../knexfile.js');
4+
5+
module.exports = knex(config.development);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
exports.up = function(knex) {
2+
return knex.schema.createTable('posts', function(posts) {
3+
posts.increments();
4+
5+
posts.string('title', 1024).notNullable();
6+
posts.text('contents').notNullable();
7+
8+
posts.timestamps(true, true);
9+
});
10+
};
11+
12+
exports.down = function(knex) {
13+
return knex.schema.dropTableIfExists('posts');
14+
};

0 commit comments

Comments
 (0)