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

Add migration for new usage table #11311

Merged
merged 3 commits into from
Jul 12, 2022
Merged

Add migration for new usage table #11311

merged 3 commits into from
Jul 12, 2022

Conversation

andrew-farries
Copy link
Contributor

@andrew-farries andrew-farries commented Jul 12, 2022

Description

Define the schema and add the migration for a new d_b_workspace_instance_usage table to store workspace usage data.

Related Issue(s)

Part of #10323

How to test

Connect to the database in the preview environment for this branch and see the new table in the database:

image

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview

@andrew-farries andrew-farries requested a review from a team July 12, 2022 11:05
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Jul 12, 2022
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-af-add-usage-table.2 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-af-add-usage-table.3 because the annotations in the pull request description changed
(with .werft/ from main)

@Column({
type: "timestamp",
precision: 6,
default: () => "CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)",
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about the defaults here, I think we want this to be required but not to default to anything

Copy link
Member

@easyCZ easyCZ left a comment

Choose a reason for hiding this comment

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

LGTM, just build is unhappy.

/hold
in case there's further changes you're looking to make but it looked complete to me (minus CI)

@andrew-farries
Copy link
Contributor Author

Thanks. I'm going to get rid of the defaults for the timestamp fields and make stoppedTime nullable before merging.

@andrew-farries
Copy link
Contributor Author

andrew-farries commented Jul 12, 2022

/werft run with-clean-slate-deployment=true

👍 started the job as gitpod-build-af-add-usage-table.6
(with .werft/ from main)

@andrew-farries
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit 58de22f into main Jul 12, 2022
@roboquat roboquat deleted the af/add-usage-table branch July 12, 2022 13:16
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/M team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants