{"id":25221760,"url":"https://github.com/devsetgo/dsg","last_synced_at":"2025-04-05T12:12:02.949Z","repository":{"id":101834148,"uuid":"225046125","full_name":"devsetgo/dsg","owner":"devsetgo","description":"My website","archived":false,"fork":false,"pushed_at":"2025-04-02T01:52:52.000Z","size":33090,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T02:38:11.479Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devsetgo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-30T17:23:53.000Z","updated_at":"2025-04-02T01:52:49.000Z","dependencies_parsed_at":"2024-09-09T01:32:25.520Z","dependency_job_id":"f1f79bdf-a499-4db2-a1de-07aca173012d","html_url":"https://github.com/devsetgo/dsg","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsetgo%2Fdsg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsetgo%2Fdsg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsetgo%2Fdsg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsetgo%2Fdsg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devsetgo","download_url":"https://codeload.github.com/devsetgo/dsg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332611,"owners_count":20921854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-10T22:53:13.548Z","updated_at":"2025-04-05T12:12:02.916Z","avatar_url":"https://github.com/devsetgo.png","language":"JavaScript","readme":"\n[![Coverage fury.io](coverage-badge.svg)](https://github.com/devsetgo/dsg)\n[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3120/)\n# DevSetGo.com\nMy personal website and blog. This is a work in progress and will be updated as I have time.\n\nFeel free to fork the project, but the content is mine. Using Calver of YY.MM.DD\n\n\n## Development SQL Scripts\n\n\nDrop all tables for POSTGRES\n```sql\nDO $$ DECLARE\n    r RECORD;\nBEGIN\n    -- if the schema you operate on is not \"current\", you will want to\n    -- replace current_schema() in query with 'schematodeletetablesfrom'\n    -- *and* update the generate 'DROP...' accordingly.\n    FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = current_schema()) LOOP\n        RAISE NOTICE 'Dropping table: %', r.tablename;\n        EXECUTE 'DROP TABLE IF EXISTS ' || quote_ident(r.tablename) || ' CASCADE';\n    END LOOP;\nEND $$;\n```\n\n# Database Migration\n\nWe use Alembic for database migration. Here are the steps to create and apply database migrations:\n\n1. **Initialize Alembic**\n\n    If you haven't already, initialize Alembic in your project:\n\n    ```bash\n    make alembic-init\n    ```\n\n    This will create a new directory named `alembic` in your project root, which contains your migration scripts.\n\n2. **Create a New Migration**\n\n    After you've made changes to your SQLAlchemy models, you can create a new migration script with:\n\n    ```bash\n    make alembic-rev\n    ```\n\n    You'll be prompted to enter a name for the migration. This name should describe the changes you've made.\n\n3. **Apply Migrations**\n\n    To apply the migrations to your database, run:\n\n    ```bash\n    make alembic-migrate\n    ```\n\n    This will upgrade your database to the latest version.\n\n4. **Downgrade Database**\n\n    If you need to downgrade your database to a previous version, you can use:\n\n    ```bash\n    make alembic-downgrade\n    ```\n\n    You'll be prompted to enter the name of the revision to downgrade to.\n\nRemember to commit your migration scripts to version control along with the corresponding changes to your models.\n\n\n# Add Git credientials\nStore and add username and email to git config\n```bash\ngit config --global credential.helper store\ngit config --global user.name \"Mike Ryan\"\ngit config --global user.email \"mikeryan56@gmail.com\"\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsetgo%2Fdsg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevsetgo%2Fdsg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsetgo%2Fdsg/lists"}