Skip to content

Conversation

nystar1
Copy link
Contributor

@nystar1 nystar1 commented Aug 8, 2025

context: setting up dev environment broken because project labels table is not created by default but the code expects & uses it
reason: table was prob directly created in postgres rather than through a migration & schema was never synced

@nystar1 nystar1 force-pushed the migration-for-project-labels branch from f019a06 to e967d8d Compare August 8, 2025 19:23
t.timestamps
end

add_index :project_labels, [ :user_id, :project_key ], unique: true
Copy link
Member

Choose a reason for hiding this comment

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

Check indentation- run the formatter!

class CreateProjectLabels < ActiveRecord::Migration[8.0]
# where was ts before?
def change
create_table :project_labels do |t|
Copy link
Member

Choose a reason for hiding this comment

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

if our code is out of sync with production database, our code should support handling the unknown! Check out https://blog.saeloun.com/2020/02/10/rails-support-for-if-exists-if-not-exists-on-remove-column-add-column-in-migrations/

@maxwofford
Copy link
Member

I left some comments, but overall thanks for the submission! I'm traveling right now, so cc @3kh0 for reviewing and merging this!

@maxwofford
Copy link
Member

@3kh0 confirming with you before we merge this to see if you know anything about these missing migrations

@maxwofford
Copy link
Member

@nystar1, can you fix the conflicts? Also heads up this edits the seeds file

@nystar1 nystar1 closed this Aug 26, 2025
@nystar1 nystar1 force-pushed the migration-for-project-labels branch from f382dba to 9bb75be Compare August 26, 2025 15:47
@nystar1 nystar1 deleted the migration-for-project-labels branch August 26, 2025 15:53
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