mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-19 22:15:14 +00:00
fix broken project labels table (#689)
* fix broken project labels table * linting
This commit is contained in:
parent
1f9e43ae78
commit
b7aae15769
2 changed files with 24 additions and 1 deletions
13
db/migrate/20251205211711_create_project_labels.rb
Normal file
13
db/migrate/20251205211711_create_project_labels.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
class CreateProjectLabels < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
create_table :project_labels do |t|
|
||||
t.string :user_id
|
||||
t.string :project_key
|
||||
t.string :label
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
add_index :project_labels, :user_id
|
||||
add_index :project_labels, [ :user_id, :project_key ], unique: true
|
||||
end
|
||||
end
|
||||
12
db/schema.rb
generated
12
db/schema.rb
generated
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.1].define(version: 2025_12_02_221230) do
|
||||
ActiveRecord::Schema[8.1].define(version: 2025_12_05_211711) do
|
||||
create_schema "pganalyze"
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_catalog.plpgsql"
|
||||
|
|
@ -414,6 +414,16 @@ ActiveRecord::Schema[8.1].define(version: 2025_12_02_221230) do
|
|||
t.index ["user_id"], name: "index_physical_mails_on_user_id"
|
||||
end
|
||||
|
||||
create_table "project_labels", force: :cascade do |t|
|
||||
t.datetime "created_at", null: false
|
||||
t.string "label"
|
||||
t.string "project_key"
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "user_id"
|
||||
t.index ["user_id", "project_key"], name: "index_project_labels_on_user_id_and_project_key", unique: true
|
||||
t.index ["user_id"], name: "index_project_labels_on_user_id"
|
||||
end
|
||||
|
||||
create_table "project_repo_mappings", force: :cascade do |t|
|
||||
t.datetime "created_at", null: false
|
||||
t.string "project_name", null: false
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue