diff --git a/bin/dbVersion.json b/bin/dbVersion.json index 1533586..8785a39 100644 --- a/bin/dbVersion.json +++ b/bin/dbVersion.json @@ -12,7 +12,8 @@ {"file": "20180718-1.sql", "version": 10}, {"file": "20180719-1.sql", "version": 11}, {"file": "20180721-1.sql", "version": 12}, - {"file": "20180807-1.sql", "version": 13} + {"file": "20180807-1.sql", "version": 13}, + {"file": "20180811-1.sql", "version": 14} ], "test": [] } \ No newline at end of file diff --git a/route/api/index.js b/route/api/index.js new file mode 100644 index 0000000..44b7549 --- /dev/null +++ b/route/api/index.js @@ -0,0 +1,4 @@ +const Router = require('koa-router') +const r = new Router() + +module.exports = r diff --git a/route/index.js b/route/index.js index 4be1dc0..1837d12 100644 --- a/route/index.js +++ b/route/index.js @@ -99,6 +99,8 @@ r.get('/image/thumbnail/:name', async (c, n) => { return n() }, getImageToRes) +r.use('/web', require('./web').routes()) +r.use('/api', require('./api').routes()) r.use('/line', require('./line').routes()) r.use('/google', require('./google').routes()) // r.use('/twitch', require('./twitch').routes()) diff --git a/route/web/index.js b/route/web/index.js new file mode 100644 index 0000000..44b7549 --- /dev/null +++ b/route/web/index.js @@ -0,0 +1,4 @@ +const Router = require('koa-router') +const r = new Router() + +module.exports = r diff --git a/schema/20180811-1.sql b/schema/20180811-1.sql new file mode 100644 index 0000000..296fe10 --- /dev/null +++ b/schema/20180811-1.sql @@ -0,0 +1,11 @@ +CREATE TABLE public.donate_progres +( + twitch varchar(100) PRIMARY KEY NOT NULL, + start_date timestamp with time zone, + end_date timestamp with time zone, + target_amount int DEFAULT 0 NOT NULL, + title varchar(200) DEFAULT '' NOT NULL, + ctime timestamp with time zone DEFAULT current_timestamp NOT NULL, + mtime timestamp with time zone DEFAULT current_timestamp NOT NULL, + CONSTRAINT donate_progres_twitch_channel_id_fk FOREIGN KEY (twitch) REFERENCES public.twitch_channel (id) ON DELETE CASCADE +); \ No newline at end of file