Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: align the system user defined in core.ts with the one created in the migration #5845

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented Jan 11, 2024

This change adjusts the exported SYSTEM_USER constant in core.ts to
match the one created in the migration in src/migrations/20231222071533-unleash-system-user.js

The slight discrepancy between these two caused me some minor headache
when trying to write a test in enterprise.

It also removes the email because we have no inbox at that address (and we probably don't want one).

For reference, the migration looks like this:

ALTER TABLE users ADD COLUMN IF NOT EXISTS is_system BOOLEAN NOT NULL DEFAULT FALSE;
INSERT INTO users
    (id, name, username, email, created_by_user_id, is_system)
VALUES
    (-1337, 'Unleash System', 'unleash_system_user', '[email protected]', -1337, true);

…d in the migration

This change adjusts the exported `SYSTEM_USER` constant in `core.ts` to
match the one created in the migration in `src/migrations/20231222071533-unleash-system-user.js`

The slight discrepancy between these two caused me some minor headache
when trying to write a test in enterprise.
Copy link

vercel bot commented Jan 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2024 8:57am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Jan 11, 2024 8:57am

This might have been in use somewhere, so it's best not to change it.
Copy link
Member

@chriswk chriswk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to me

thomasheartman added a commit that referenced this pull request Jan 11, 2024
This matches the email that is used by the system user defined in
`core.ts`.

This is the companion PR to
#5845. With both of those
merged, the system user in the DB should match the one defined in `core.ts`
thomasheartman added a commit that referenced this pull request Jan 11, 2024
This matches the email that is used by the system user defined in
`core.ts`.

This is the companion PR to
#5845. With both of those
merged, the system user in the DB should match the one defined in `core.ts`
@thomasheartman thomasheartman merged commit 0b5ac19 into main Jan 11, 2024
12 checks passed
@thomasheartman thomasheartman deleted the chore/align-system-users branch January 11, 2024 09:39
thomasheartman added a commit that referenced this pull request Jan 11, 2024
…e created in the migration (#5845)"

This reverts commit 0b5ac19.
thomasheartman added a commit that referenced this pull request Jan 11, 2024
…e created in the migration (#5845)" (#5852)

This reverts commit 0b5ac19.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants