diff options
author | Vitaly Takmazov | 2023-07-19 23:50:14 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-07-19 23:59:40 +0300 |
commit | c576c003716851863c832b5e0dacb9186516f167 (patch) | |
tree | 420c517806d28db3c8f448eacbc3d61f01106629 /src/main/resources | |
parent | 128753a9bd11e09940d58d97c67db59a15251b71 (diff) |
Migrate to Twitter API 2.0
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/db/migration/V1.48__twitter_refresh_token.sql | 1 | ||||
-rw-r--r-- | src/main/resources/schema-h2.sql | 1 | ||||
-rw-r--r-- | src/main/resources/schema-mysql.sql | 1 | ||||
-rw-r--r-- | src/main/resources/schema-sqlite.sql | 1 | ||||
-rw-r--r-- | src/main/resources/schema-sqlserver.sql | 1 | ||||
-rw-r--r-- | src/main/resources/templates/views/post.html | 3 |
6 files changed, 8 insertions, 0 deletions
diff --git a/src/main/resources/db/migration/V1.48__twitter_refresh_token.sql b/src/main/resources/db/migration/V1.48__twitter_refresh_token.sql new file mode 100644 index 00000000..a01efb64 --- /dev/null +++ b/src/main/resources/db/migration/V1.48__twitter_refresh_token.sql @@ -0,0 +1 @@ +alter table twitter add column refresh_token character varying(255) not null default '';
\ No newline at end of file diff --git a/src/main/resources/schema-h2.sql b/src/main/resources/schema-h2.sql index 97b16799..7aaee493 100644 --- a/src/main/resources/schema-h2.sql +++ b/src/main/resources/schema-h2.sql @@ -212,6 +212,7 @@ CREATE MEMORY TABLE "PUBLIC"."FACEBOOK"( CREATE MEMORY TABLE "PUBLIC"."TWITTER"( "USER_ID" INTEGER NOT NULL, "ACCESS_TOKEN" CHARACTER VARYING(255), + "REFRESH_TOKEN" CHARACTER VARYING(255) NOT NULL DEFAULT '', "ACCESS_TOKEN_SECRET" CHARACTER(64) NOT NULL, "UNAME" CHARACTER(64) NOT NULL, "TS" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, diff --git a/src/main/resources/schema-mysql.sql b/src/main/resources/schema-mysql.sql index 0bee0ed6..0e035d5e 100644 --- a/src/main/resources/schema-mysql.sql +++ b/src/main/resources/schema-mysql.sql @@ -517,6 +517,7 @@ DROP TABLE IF EXISTS `twitter`; CREATE TABLE `twitter` ( `user_id` int(10) unsigned NOT NULL, `access_token` varchar(255) DEFAULT NULL, + `refresh_token` varchar(255) NOT NULL DEFAULT '', `access_token_secret` char(64) NOT NULL, `uname` char(64) NOT NULL, `ts` timestamp NOT NULL DEFAULT current_timestamp(), diff --git a/src/main/resources/schema-sqlite.sql b/src/main/resources/schema-sqlite.sql index 2b32635e..b0858f1b 100644 --- a/src/main/resources/schema-sqlite.sql +++ b/src/main/resources/schema-sqlite.sql @@ -211,6 +211,7 @@ CREATE TABLE telegram ( CREATE TABLE twitter ( user_id INTEGER NOT NULL, access_token character varying(64) NOT NULL, + refresh_token character varying(255) NOT NULL DEFAULT '', access_token_secret character varying(64) NOT NULL, uname character varying(64) NOT NULL, ts DEFAULT (strftime('%s','now') || substr(strftime('%f','now'),4)) NOT NULL, diff --git a/src/main/resources/schema-sqlserver.sql b/src/main/resources/schema-sqlserver.sql index 11e07b7b..947e5403 100644 --- a/src/main/resources/schema-sqlserver.sql +++ b/src/main/resources/schema-sqlserver.sql @@ -223,6 +223,7 @@ CREATE TABLE telegram ( CREATE TABLE twitter ( user_id bigint NOT NULL, access_token character varying(64) NOT NULL, + refresh_token character varying(255) NOT NULL DEFAULT '', access_token_secret character varying(64) NOT NULL, uname character varying(64) NOT NULL, ts datetimeoffset DEFAULT CURRENT_TIMESTAMP NOT NULL, diff --git a/src/main/resources/templates/views/post.html b/src/main/resources/templates/views/post.html index a77fa3bd..10f1ccb0 100644 --- a/src/main/resources/templates/views/post.html +++ b/src/main/resources/templates/views/post.html @@ -2,6 +2,9 @@ {% import "views/macros/tags" %} {% block content %} <article> +{%if twitter1 %} + <h2 style="color: red; padding: 20px;">Reconnect or disable your Twitter account</h2> +{% endif %} <form id="postmsg"> <p style="text-align: left;"> <b>Фото:</b> <span id="attachmentfile"> |