From 86025df1f6d814c98a14211ceb4da6cf6de915c7 Mon Sep 17 00:00:00 2001
From: Nathan Perry <avaglir@gmail.com>
Date: Fri, 8 Mar 2019 16:57:27 -0500
Subject: first pass with oauth

---
 migrations/2019-03-08-073831_store-token/up.sql | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 migrations/2019-03-08-073831_store-token/up.sql

(limited to 'migrations/2019-03-08-073831_store-token/up.sql')

diff --git a/migrations/2019-03-08-073831_store-token/up.sql b/migrations/2019-03-08-073831_store-token/up.sql
new file mode 100644
index 0000000..94f826b
--- /dev/null
+++ b/migrations/2019-03-08-073831_store-token/up.sql
@@ -0,0 +1,10 @@
+CREATE TABLE google_oauth_tokens (
+    id SERIAL PRIMARY KEY,
+    token VARCHAR NOT NULL,
+    refresh_token VARCHAR NOT NULL,
+    expiration TIMESTAMP NOT NULL,
+    created TIMESTAMP NOT NULL DEFAULT current_timestamp
+);
+
+CREATE INDEX oauth_token_exp_index ON google_oauth_tokens (expiration);
+CREATE INDEX oauth_token_created_index ON google_oauth_tokens (created);
-- 
cgit v1.3.1

