• Supercontest
      • Postgres (#19)
        • Changed the postgres ‘supercontest’ user’s password to match the mail password, all inject into the app.config at the same time during initialization.
        • In PyCharm’s db navigator, my actual tables are under schemas -> public -> tables.
        • Ahhhhhhhhhh. It did migrate my users properly. I was selecting the literal user table from postgres, which just had me. `select * from public.user` shows all 42 supercontest users. “public” is the schema which you have to run the query against.
        • The leaderboard view works again. The select has to match the group_by in postgres. Postgres also has `DISTINCT ON`, which is useful.
        • Fixed the week ordering issue. Just had to add .order_by(Matchup.week) to a couple queries. It looks like distinct() is what does the reordering. group_by() and all() and filter() didn’t affect any of the existing order of the returns.
        • Created a new alembic version, even though there had been no changes in the model yet. Alembic seemed to persist through the underlying sqlite->postgres migration without any issue. This makes sense, since it transacts with the db and manages it purely with SQL, independent of the DB implementation, but I’m still surprised that there were no gotchas here. Maybe there will be. I’m still suspicious.
          • Alembic correctly autodetected the implementation context. It has a PostgresqlImpl class.
        • Postgres has the notion of “sequences” which are commonly used as the primary key IDs for tables. You have to be explicit about this by defining SQLAlchemy().Sequence() in the schema (next to integer and primary key).
        • PRed and merged the postgres branch after testing locally. Did not push to production server. I will wait until I implement the db container (next) to make that a bit easier to handle (revert/change).
      • Docker
        • sudo apt install docker.io docker-compose
    • HN. Ya, common mispractices in hiring: http://tonsky.me/blog/hiring/.
    • You can actually run linux containers on a windows host (but not vice versa) because newer windows machines ship with a base image of ubuntu in addition to the windows os.
    • Enabled “Career Interests” on LinkedIn which lets recruiters know that I’m looking. Also provided my information to gain access to salary insights.
    • Remember the command to compare your current branch to master: `git diff origin/master…`