fix: task py:migrate description (#3932)

This commit is contained in:
Kuchenpirat authored and GitHub committed 2024-07-23 15:43:21 +00:00
1 parent 2c4d0b692b
commit 8c29bd3439
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -148,7 +148,7 @@ tasks:
- poetry run python mealie/app.py
py:migrate:
desc: generates a new database migration file e.g. task py:migrate "add new column"
desc: generates a new database migration file e.g. task py:migrate -- "add new column"
cmds:
- poetry run alembic revision --autogenerate -m "{{ .CLI_ARGS }}"
- task: py:format
@@ -9,7 +9,7 @@ How exactly you need to modify it is of course highly contextual to the change y
## Using Alembic to generate upgrade script
In your dev container you can run something like (change the message) `task py:migrate "Add creation tag to group preferences"` to have Alembic generate an upgrade script for you.
In your dev container you can run something like (change the message) `task py:migrate -- "Add creation tag to group preferences"` to have Alembic generate an upgrade script for you.
The script Alembic generates, will be limited! (Perhaps there's a way to resolve that? Haven't looked into it yet)
For example, Alembic generated a script _similar_ to this (it has been modified already to have accurate foreign key names, for instance):
+1 -1
View File
@@ -14,7 +14,7 @@
<div id="redoc-container"></div>
<script src="https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js"> </script>
<script>
var spec = {"openapi": "3.1.0", "info": {"title": "Mealie", "description": "\nMealie is a web application for managing your recipes, meal plans, and shopping lists. This is the Restful\nAPI interactive documentation that can be used to explore the API. If you're justing getting started with\nthe API and want to get started quickly, you can use the\n[API Usage | Mealie Docs](https://nightly.mealie.io/documentation/getting-started/api-usage/)\nas a reference for how to get started.\n\n\nAs of this release <b>develop</b>, Mealie is still in rapid development and therefore some of these APIs may\nchange from version to version.\n\n\nIf you have any questions or comments about mealie, please use the discord server to talk to the developers or other\ncommunity members. If you'd like to file an issue, please use the\n[GitHub Issue Tracker | Mealie](https://github.com/mealie-recipes/mealie/issues/new/choose)\n\n\n## Helpful Links\n- [Home Page](https://mealie.io)\n- [Documentation](https://nightly.mealie.io)\n- [Discord](https://discord.gg/QuStdQGSGK)\n- [Demo](https://demo.mealie.io)\n- [Beta](https://demo.mealie.io)\n", "version": "develop"}, "paths": {"/api/app/about": {"get": {"tags": ["App: About"], "summary": "Get App Info", "description": "Get general application information", "operationId": "get_app_info_api_app_about_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppInfo"}}}}}}}, "/api/app/about/startup-info": {"get": {"tags": ["App: About"], "summary": "Get Startup Info", "description": "returns helpful startup information", "operationId": "get_startup_info_api_app_about_startup_info_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppStartupInfo"}}}}}}}, "/api/app/about/theme": {"get": {"tags": ["App: About"], "summary": "Get App Theme", "description": "Get's the current theme settings", "operationId": "get_app_theme_api_app_about_theme_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppTheme"}}}}}}}, "/api/app/about/oidc": {"get": {"tags": ["App: About"], "summary": "Get Oidc Info", "description": "Get's the current OIDC configuration needed for the frontend", "operationId": "get_oidc_info_api_app_about_oidc_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OIDCInfo"}}}}}}}, "/api/auth/token": {"post": {"tags": ["Users: Authentication"], "summary": "Get Token", "operationId": "get_token_api_auth_token_post", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"allOf": [{"$ref": "#/components/schemas/Body_get_token_api_auth_token_post"}], "title": "Body"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/auth/refresh": {"get": {"tags": ["Users: Authentication"], "summary": "Refresh Token", "description": "Use a valid token to get another token", "operationId": "refresh_token_api_auth_refresh_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/auth/logout": {"post": {"tags": ["Users: Authentication"], "summary": "Logout", "operationId": "logout_api_auth_logout_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/users/register": {"post": {"tags": ["Users: Registration"], "summary": "Register New User", "operationId": "register_new_user_api_users_register_post", "parameters": [{"name": "group_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "uuid4"}, {"type": "null"}], "title": "Group Id"}}, {"name": "accept-language", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Accept-Language"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateUserRegistration"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserOut"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/users/group-users": {"get": {"tags": ["Users: CRUD"], "summary": "Get All Group Users", "description": "Returns all users from the current group", "operationId": "get_all_group_users_api_users_group_users_get", "security": [{"OAuth2PasswordBearer": []}, {"OAuth2PasswordBLine truncated
var spec = {"openapi": "3.1.0", "info": {"title": "Mealie", "description": "\nMealie is a web application for managing your recipes, meal plans, and shopping lists. This is the Restful\nAPI interactive documentation that can be used to explore the API. If you're justing getting started with\nthe API and want to get started quickly, you can use the\n[API Usage | Mealie Docs](https://docs.mealie.io/documentation/getting-started/api-usage/)\nas a reference for how to get started.\n\n\nIf you have any questions or comments about mealie, please use the discord server to talk to the developers or other\ncommunity members. If you'd like to file an issue, please use the\n[GitHub Issue Tracker | Mealie](https://github.com/mealie-recipes/mealie/issues/new/choose)\n\n\n## Helpful Links\n- [Home Page](https://mealie.io)\n- [Documentation](https://docs.mealie.io)\n- [Discord](https://discord.gg/QuStdQGSGK)\n- [Demo](https://demo.mealie.io)\n", "version": "develop"}, "paths": {"/api/app/about": {"get": {"tags": ["App: About"], "summary": "Get App Info", "description": "Get general application information", "operationId": "get_app_info_api_app_about_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppInfo"}}}}}}}, "/api/app/about/startup-info": {"get": {"tags": ["App: About"], "summary": "Get Startup Info", "description": "returns helpful startup information", "operationId": "get_startup_info_api_app_about_startup_info_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppStartupInfo"}}}}}}}, "/api/app/about/theme": {"get": {"tags": ["App: About"], "summary": "Get App Theme", "description": "Get's the current theme settings", "operationId": "get_app_theme_api_app_about_theme_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppTheme"}}}}}}}, "/api/app/about/oidc": {"get": {"tags": ["App: About"], "summary": "Get Oidc Info", "description": "Get's the current OIDC configuration needed for the frontend", "operationId": "get_oidc_info_api_app_about_oidc_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OIDCInfo"}}}}}}}, "/api/auth/token": {"post": {"tags": ["Users: Authentication"], "summary": "Get Token", "operationId": "get_token_api_auth_token_post", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"allOf": [{"$ref": "#/components/schemas/Body_get_token_api_auth_token_post"}], "title": "Body"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/auth/refresh": {"get": {"tags": ["Users: Authentication"], "summary": "Refresh Token", "description": "Use a valid token to get another token", "operationId": "refresh_token_api_auth_refresh_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/auth/logout": {"post": {"tags": ["Users: Authentication"], "summary": "Logout", "operationId": "logout_api_auth_logout_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/users/register": {"post": {"tags": ["Users: Registration"], "summary": "Register New User", "operationId": "register_new_user_api_users_register_post", "parameters": [{"name": "accept-language", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Accept-Language"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateUserRegistration"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserOut"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/users/group-users": {"get": {"tags": ["Users: CRUD"], "summary": "Get All Group Users", "description": "Returns all users from the current group", "operationId": "get_all_group_users_api_users_group_users_get", "security": [{"OAuth2PasswordBearer": []}, {"OAuth2PasswordBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "default": 1, "title": "Page"}}, {"name": "perPage", "in": "query", "required": false, "schema": {"type": "integer", "default": 50, "title": "Perpage"}}, {"name": "orderBy", "in": "query", "required": false, "schema": {"anyOf": [{"typLine truncated
Redoc.init(spec, {}, document.getElementById("redoc-container"));
</script>