1
1
Fork
You've already forked site
0

chore: addressing nits #309

Merged
robida merged 6 commits from code-cleanup into main 2026年01月28日 22:40:30 +01:00
-- oauth_clients
ALTERTABLEoauth_clientsRENAMETOoauth_clients_old;CREATETABLEIFNOTEXISTSoauth_clients(client_idTEXTPRIMARYKEY,client_secret_hashTEXT,redirect_urisJSONNOTNULLDEFAULT'[]',allowed_scopesJSONNOTNULLDEFAULT'[]',client_nameTEXT,client_uriURL,logo_uriURL,contactsJSON,token_endpoint_auth_methodTEXTDEFAULT'client_secret_basic',grant_typesJSONDEFAULT'["authorization_code"]',response_typesJSONDEFAULT'["code"]',registration_access_token_hashTEXT,created_atTIMESTAMPDEFAULT(strftime('%Y-%m-%dT%H:%M:%SZ','now')));INSERTINTOoauth_clientsSELECT*FROMoauth_clients_old;DROPTABLEoauth_clients_old;-- push_login_requests
ALTERTABLEpush_login_requestsRENAMETOpush_login_requests_old;CREATETABLEIFNOTEXISTSpush_login_requests(tokenTEXTPRIMARYKEY,meURLNOTNULL,statusTEXTNOTNULLDEFAULT'pending',next_urlTEXT,created_atTIMESTAMPDEFAULT(strftime('%Y-%m-%dT%H:%M:%SZ','now')),expires_atTIMESTAMPNOTNULL);INSERTINTOpush_login_requestsSELECT*FROMpush_login_requests_old;DROPTABLEpush_login_requests_old;-- oauth_authorization_codes
ALTERTABLEoauth_authorization_codesRENAMETOoauth_authorization_codes_old;CREATETABLEIFNOTEXISTSoauth_authorization_codes(codeTEXTPRIMARYKEY,client_idTEXTNOTNULL,meURLNOTNULL,redirect_uriURLNOTNULL,response_typeTEXTNOTNULL,scopeTEXTNOTNULL,resourceTEXT,code_challengeTEXT,code_challenge_methodTEXT,nonceTEXT,access_token_expires_inINTEGER,usedBOOLEANDEFAULTFALSE,expires_atTIMESTAMPNOTNULL,revokedBOOLEANDEFAULTFALSE,created_atTIMESTAMPDEFAULT(strftime('%Y-%m-%dT%H:%M:%SZ','now')));INSERTINTOoauth_authorization_codesSELECT*FROMoauth_authorization_codes_old;DROPTABLEoauth_authorization_codes_old;
```sql -- oauth_clients ALTER TABLE oauth_clients RENAME TO oauth_clients_old; CREATE TABLE IF NOT EXISTS oauth_clients ( client_id TEXT PRIMARY KEY, client_secret_hash TEXT, redirect_uris JSON NOT NULL DEFAULT '[]', allowed_scopes JSON NOT NULL DEFAULT '[]', client_name TEXT, client_uri URL, logo_uri URL, contacts JSON, token_endpoint_auth_method TEXT DEFAULT 'client_secret_basic', grant_types JSON DEFAULT '["authorization_code"]', response_types JSON DEFAULT '["code"]', registration_access_token_hash TEXT, created_at TIMESTAMP DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')) ); INSERT INTO oauth_clients SELECT * FROM oauth_clients_old; DROP TABLE oauth_clients_old; -- push_login_requests ALTER TABLE push_login_requests RENAME TO push_login_requests_old; CREATE TABLE IF NOT EXISTS push_login_requests ( token TEXT PRIMARY KEY, me URL NOT NULL, status TEXT NOT NULL DEFAULT 'pending', next_url TEXT, created_at TIMESTAMP DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')), expires_at TIMESTAMP NOT NULL ); INSERT INTO push_login_requests SELECT * FROM push_login_requests_old; DROP TABLE push_login_requests_old; -- oauth_authorization_codes ALTER TABLE oauth_authorization_codes RENAME TO oauth_authorization_codes_old; CREATE TABLE IF NOT EXISTS oauth_authorization_codes ( code TEXT PRIMARY KEY, client_id TEXT NOT NULL, me URL NOT NULL, redirect_uri URL NOT NULL, response_type TEXT NOT NULL, scope TEXT NOT NULL, resource TEXT, code_challenge TEXT, code_challenge_method TEXT, nonce TEXT, access_token_expires_in INTEGER, used BOOLEAN DEFAULT FALSE, expires_at TIMESTAMP NOT NULL, revoked BOOLEAN DEFAULT FALSE, created_at TIMESTAMP DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')) ); INSERT INTO oauth_authorization_codes SELECT * FROM oauth_authorization_codes_old; DROP TABLE oauth_authorization_codes_old; ```
robida force-pushed code-cleanup from 29892c6c3f
Some checks failed
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
to a2784d6d2e 2026年01月28日 22:24:13 +01:00
Compare
robida deleted branch code-cleanup 2026年01月28日 22:40:30 +01:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
robida/site!309
Reference in a new issue
robida/site
No description provided.
Delete branch "code-cleanup"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?