Skip to content

Commit

Permalink
Breaking: convert type of all primary keys to uuid4
Browse files Browse the repository at this point in the history
  • Loading branch information
norbye committed Jan 25, 2025
1 parent fc0b502 commit 081916a
Show file tree
Hide file tree
Showing 36 changed files with 727 additions and 921 deletions.
12 changes: 6 additions & 6 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ steps:
- yarn knip

- name: missing-migrations
image: abakus/lego-testbase:poetry
image: abakus/lego-testbase:python3.12poetry1.8.5
when:
event: [push]
environment:
Expand All @@ -60,7 +60,7 @@ steps:
- tox -e missing-migrations

- name: tests
image: abakus/lego-testbase:poetry
image: abakus/lego-testbase:python3.12poetry1.8.5
when:
event: [push]
environment:
Expand All @@ -69,7 +69,7 @@ steps:
- tox -e tests

- name: coverage
image: abakus/lego-testbase:poetry
image: abakus/lego-testbase:python3.12poetry1.8.5
when:
event: [push]
depends_on:
Expand All @@ -80,14 +80,14 @@ steps:
- tox -e coverage

- name: isort
image: abakus/lego-testbase:poetry
image: abakus/lego-testbase:python3.12poetry1.8.5
when:
event: [push]
commands:
- tox -e isort

- name: black
image: abakus/lego-testbase:poetry
image: abakus/lego-testbase:python3.12poetry1.8.5
when:
event: [push]
commands:
Expand All @@ -112,7 +112,7 @@ steps:
- yarn cypress install

- name: cypress-backend
image: abakus/lego-testbase:python3.11
image: abakus/lego-testbase:python3.12poetry1.8.5
detach: true
when:
event: [push]
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ var/
.installed.cfg
*.egg

.python-version

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ENV RELEASE ${RELEASE}

RUN yarn build

FROM python:3.9
FROM python:3.12
MAINTAINER Abakus Webkom <[email protected]>

ARG RELEASE
Expand All @@ -24,7 +24,7 @@ ENV PYTHONUNBUFFERED 1
ENV ENV_CONFIG 1
ENV RELEASE ${RELEASE}

RUN pip install "poetry==1.4.0"
RUN pip install "poetry==1.8.5"

RUN mkdir /app
COPY poetry.lock pyproject.toml /app/
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ dev_settings:
echo "from .development import *" > admissions/settings/local.py

fixme:
docker run --rm -v ${PWD}:/code -it python:3.9-slim "bash" "-c" "cd /code && pip install poetry && poetry install && poetry run isort -rc admissions && poetry run black admissions"
docker run --rm -v ${PWD}:/code -it python:3.12-slim "bash" "-c" "cd /code && pip install poetry && poetry install && poetry run isort -rc admissions && poetry run black admissions"

.PHONY: ci_settings dev_settings
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ OAuth through [abakus.no](https://abakus.no/)

To run this project, you need

1. python 3.9
1. python 3.12
2. Docker OR a `postgresql` database
3. [poetry](https://python-poetry.org/) ([installation guide](https://python-poetry.org/docs/#installation))
4. Node and yarn
Expand Down
27 changes: 18 additions & 9 deletions admissions/admissions/fixtures/groups.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[
{
"model": "admissions.group",
"pk": 4,
"pk": "dd9c88fb-b876-4fa0-8da4-a53cf5e951dd",
"fields": {
"lego_id": 4,
"name": "Arrkom",
"description": "",
"response_label": "",
Expand All @@ -12,8 +13,9 @@
},
{
"model": "admissions.group",
"pk": 6,
"pk": "52dc253c-4124-4af7-9bf4-a468cda6f51a",
"fields": {
"lego_id": 6,
"name": "Bankkom",
"description": "",
"response_label": "",
Expand All @@ -23,8 +25,9 @@
},
{
"model": "admissions.group",
"pk": 7,
"pk": "a5431295-723e-4c1e-ac19-bf67b91e345c",
"fields": {
"lego_id": 7,
"name": "Bedkom",
"description": "",
"response_label": "",
Expand All @@ -34,8 +37,9 @@
},
{
"model": "admissions.group",
"pk": 8,
"pk": "c2a37269-1ca2-4895-92a6-0eb062be3032",
"fields": {
"lego_id": 8,
"name": "Fagkom",
"description": "",
"response_label": "",
Expand All @@ -45,8 +49,9 @@
},
{
"model": "admissions.group",
"pk": 9,
"pk": "40a51af3-570f-44db-849d-8ebb3342225f",
"fields": {
"lego_id": 9,
"name": "Koskom",
"description": "",
"response_label": "",
Expand All @@ -56,8 +61,9 @@
},
{
"model": "admissions.group",
"pk": 10,
"pk": "47012e82-8a57-41b9-9278-a9ee2efeba65",
"fields": {
"lego_id": 10,
"name": "LaBamba",
"description": "",
"response_label": "",
Expand All @@ -67,8 +73,9 @@
},
{
"model": "admissions.group",
"pk": 11,
"pk": "5e12bb5e-bcf2-47f7-aaf8-413a18ed456a",
"fields": {
"lego_id": 11,
"name": "PR",
"description": "",
"response_label": "",
Expand All @@ -78,8 +85,9 @@
},
{
"model": "admissions.group",
"pk": 12,
"pk": "2b7d7ccb-c0cf-41eb-b27e-fc0af986190a",
"fields": {
"lego_id": 12,
"name": "readme",
"description": "",
"response_label": "",
Expand All @@ -89,8 +97,9 @@
},
{
"model": "admissions.group",
"pk": 13,
"pk": "cb52868a-3051-49b0-932b-3b413aae0acc",
"fields": {
"lego_id": 13,
"name": "Webkom",
"description": "",
"response_label": "",
Expand Down
3 changes: 2 additions & 1 deletion admissions/admissions/fixtures/users.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[
{
"model": "admissions.legouser",
"pk": 1,
"pk": "65ca1129-450b-427b-9ccb-1c20e2914a0e",
"fields": {
"lego_id": 1,
"password": "!W6bpQDTHBqNhW2iHurip7hOro0pMikKCBTwmbrqY",
"last_login": "2024-05-16T06:33:20.316Z",
"is_superuser": false,
Expand Down
Loading

0 comments on commit 081916a

Please sign in to comment.