Remove documents table (#618)

* Remove documents table (WIP)

* Further cleanup of documents table

* This should clean up the errors, but actual attachment handling still needs added.

* Full generation to update the JS side of things too

* Further fixes

* Fix cyclic dependency issue

* In theory the API side works now

* Fix go linting issues

* Fix frontend issues

* Way closer, but has a foreign key constrant issue

* UI actually works now

* Fix deduplication feature not working right

* Upgrade to `golangci-lint` v2 file

* Add ability to set primary during attachment creation

* Update swagger with new primary attachment during creation stuff

* Files are actually saved now, but there's still a bug

* Fix critical issue whith how deletions were working

* Fix the byte copy issue

* Hopefully everything is fixed now

* Fix golangci-lint config and lint files

* Fix lint issue

* Fix a few more tests

* Fix lint issues again

* More minor test fixes

* Update backend/internal/core/services/service_items_attachments.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix migration (I think)

* Fixed postgres migration

* Change some migration options to work better

* Some more little things that I tried

* Fix merge go.mod

* Fix migrations

* Little lint thing

* Fix AttachmentsList.vue with updated API

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Matt Kilgore
2025-05-03 10:15:54 -04:00
committed by GitHub
parent a64d0c5b4c
commit 606a92b5d5
58 changed files with 900 additions and 4857 deletions

View File

@@ -771,6 +771,12 @@
"in": "formData",
"required": true
},
{
"type": "boolean",
"description": "Is this the primary attachment",
"name": "primary",
"in": "formData"
},
{
"type": "string",
"description": "name of the file including extension",
@@ -2106,20 +2112,6 @@
}
}
},
"repo.DocumentOut": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"path": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"repo.Group": {
"type": "object",
"properties": {
@@ -2180,15 +2172,18 @@
"createdAt": {
"type": "string"
},
"document": {
"$ref": "#/definitions/repo.DocumentOut"
},
"id": {
"type": "string"
},
"path": {
"type": "string"
},
"primary": {
"type": "boolean"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
},