ysinghc opened a new pull request, #8707: URL: https://github.com/apache/incubator-devlake/pull/8707
### Summary What does this PR do? This PR fixes a MySQL datetime error that occurs when creating GitHub connections with Personal Access Tokens (PATs). The fix modifies the `token_expires_at` and `refresh_token_expires_at` columns in the `_tool_github_connections` table to be nullable. **The Problem:** - MySQL rejects `'0000-00-00'` datetime values with error: `Error 1292 (22007): Incorrect datetime value: '0000-00-00' for column 'token_expires_at'` - PAT-based GitHub connections don't have OAuth-style token expiration, so these fields should be NULL - The database columns were not nullable, causing connection creation to fail **The Solution:** - Added a database migration script to alter `token_expires_at` and `refresh_token_expires_at` columns to be nullable (`*time.Time`) - This allows PAT connections to store NULL values while OAuth connections can still store actual expiration timestamps ### Does this close any open issues? Closes #8693 ### Screenshots ### Other Information -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
