mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-28 16:55:32 +00:00
deleted bad migfration structure
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package migrations_index
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/dbmodels"
|
||||
@@ -1,4 +1,4 @@
|
||||
package migrations_index
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/pagemodels"
|
||||
@@ -6,9 +6,11 @@ import (
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
)
|
||||
|
||||
const BESCHREIBUNG = "Musenalm: Verzeichnis deutschsprachiger Almanache des 18. und 19. Jahrhunderts. Historische Texte zum Almanachwesen."
|
||||
const KABINETT_NAME = "Lesekabinett"
|
||||
|
||||
var text = `<h1>Texte zum Almanachwesen</h1>
|
||||
const KABINETT_BESCHREIBUNG = "Musenalm: Verzeichnis deutschsprachiger Almanache des 18. und 19. Jahrhunderts. Historische Texte zum Almanachwesen."
|
||||
|
||||
const KABINETT_TEXT = `<h1>Texte zum Almanachwesen</h1>
|
||||
<p><em>Joseph Franz von Ratschky:</em> Vorbericht. in: Wiener Musenalmanach. 1779, S. 3-6. [↓<a href="/assets/Lesekabinett/ratschky_in_wiener_1779.pdf" target="_blank" rel="noopener">Download</a>]</p>
|
||||
<p><em>Gottfried August Bürger:</em> Nothgedrungene Nachrede. in: Göttinger Musenalmanach. 1782, S. 184-192. [↓<a href="/assets/Lesekabinett/buerger_in_goettinger_1782.pdf" target="_blank" rel="noopener">Download</a>]</p>
|
||||
<p><em>Christian Cay Lorenz Hirschfeld: </em>An die Leser. in: Gartenkalender. 1783, S. 272. [↓<a href="/assets/Lesekabinett/hirschfeld_in_gartenkalender_1783.pdf" target="_blank" rel="noopener">Download</a>]</p>
|
||||
@@ -25,22 +27,22 @@ var text = `<h1>Texte zum Almanachwesen</h1>
|
||||
<h1>Allotria und Kuriosa</h1>
|
||||
<p><em>Anonymus:</em> Woher das Wort Almanach komme. in: Neues Wochenblatt zum Nuzzen und zur Unterhaltung für Kinder und junge Leute. Erstes Bändchen, erstes Stück, Leipzig, in der Sommerschen Buchhandlung 1794, S. 8f. [↓<a href="/assets/Lesekabinett/allatroia_anonymus_wochenblatt_1794.pdf" target="_blank" rel="noopener">Download</a>]</p>`
|
||||
|
||||
var texte_fields = core.NewFieldsList(
|
||||
var kabinett_fields = core.NewFieldsList(
|
||||
pagemodels.EditorField(pagemodels.F_TEXT),
|
||||
)
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
collection_t := texteCollection()
|
||||
collection_t := kabinettCollection()
|
||||
if err := app.Save(collection_t); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
r := core.NewRecord(collection_t)
|
||||
page := pagemodels.NewTextPage(r)
|
||||
page.SetText(text)
|
||||
page.SetTitle("Lesekabinett")
|
||||
page.SetDescription(BESCHREIBUNG)
|
||||
page.SetText(KABINETT_TEXT)
|
||||
page.SetTitle(KABINETT_NAME)
|
||||
page.SetDescription(KABINETT_BESCHREIBUNG)
|
||||
|
||||
if err := app.Save(r); err != nil {
|
||||
return err
|
||||
@@ -59,8 +61,8 @@ func init() {
|
||||
})
|
||||
}
|
||||
|
||||
func texteCollection() *core.Collection {
|
||||
func kabinettCollection() *core.Collection {
|
||||
c := pagemodels.BasePageCollection(pagemodels.P_KABINETT_NAME)
|
||||
c.Fields = append(c.Fields, texte_fields...)
|
||||
c.Fields = append(c.Fields, kabinett_fields...)
|
||||
return c
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package migrations_index
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
@@ -18,7 +18,8 @@ const ABS1 = "<p>Die Epoche der Almanache und Taschenbücher in der deutschsprac
|
||||
|
||||
const ABS2 = "Die laufend aktualisierte Datenbank erfasst die Almanache nach <a href='/reihen'>Reihen</a>, <a href='/personen'>Personen</a> und verschiedenen Arten von Beiträgen — Textbeiträgen, Graphiken oder Musikbeiträgen. Umfangreiche <a href='/suche'>Suchfunktionen</a> helfen bei der Erschließung des Materials."
|
||||
|
||||
const BESCHREIBUNG = "Musenalm: Verzeichnis deutschsprachiger Almanache des 18. und 19. Jahrhunderts."
|
||||
const START_TITLE = "Musenalm"
|
||||
const START_BESCHREIBUNG = "Musenalm: Verzeichnis deutschsprachiger Almanache des 18. und 19. Jahrhunderts."
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
@@ -37,10 +38,10 @@ func init() {
|
||||
}
|
||||
|
||||
text := pagemodels.NewIndexTexte(core.NewRecord(index_collection))
|
||||
text.SetTitle("Musenalm")
|
||||
text.SetTitle(START_TITLE)
|
||||
text.SetAbs1(ABS1)
|
||||
text.SetAbs2(ABS2)
|
||||
text.SetDescription(BESCHREIBUNG)
|
||||
text.SetDescription(START_BESCHREIBUNG)
|
||||
|
||||
if err := app.Save(text); err != nil {
|
||||
app.Logger().Error("Failed to save text:", "error", err, "text", text)
|
||||
@@ -1,4 +1,4 @@
|
||||
package migrations_danksagungen
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/dbmodels"
|
||||
@@ -7,13 +7,13 @@ import (
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
)
|
||||
|
||||
var reihen_fields = core.NewFieldsList(
|
||||
var dank_fields = core.NewFieldsList(
|
||||
pagemodels.EditorField(pagemodels.F_TEXT),
|
||||
)
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
collection := pageCollection()
|
||||
collection := dankCollection()
|
||||
if err := app.Save(collection); err != nil {
|
||||
app.Logger().Error("Failed to save collection:", "error", err, "collection", collection)
|
||||
return err
|
||||
@@ -32,9 +32,9 @@ func init() {
|
||||
})
|
||||
}
|
||||
|
||||
func pageCollection() *core.Collection {
|
||||
func dankCollection() *core.Collection {
|
||||
c := pagemodels.BasePageCollection(pagemodels.P_DANK_NAME)
|
||||
c.Fields = append(c.Fields, reihen_fields...)
|
||||
c.Fields = append(c.Fields, dank_fields...)
|
||||
dbmodels.SetBasicPublicRules(c)
|
||||
return c
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package migrations_dokumentation
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"errors"
|
||||
@@ -9,13 +9,13 @@ import (
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
)
|
||||
|
||||
var reihen_fields = core.NewFieldsList(
|
||||
var dok_fields = core.NewFieldsList(
|
||||
pagemodels.EditorField(pagemodels.F_TEXT),
|
||||
)
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
collection := pageCollection()
|
||||
collection := dokCollection()
|
||||
if err := app.Save(collection); err != nil {
|
||||
app.Logger().Error("Failed to save collection:", "error", err, "collection", collection)
|
||||
return err
|
||||
@@ -48,9 +48,9 @@ func init() {
|
||||
})
|
||||
}
|
||||
|
||||
func pageCollection() *core.Collection {
|
||||
func dokCollection() *core.Collection {
|
||||
c := pagemodels.BasePageCollection(pagemodels.P_DOK_NAME)
|
||||
c.Fields = append(c.Fields, reihen_fields...)
|
||||
c.Fields = append(c.Fields, dok_fields...)
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package migrations_einfuehrung
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/dbmodels"
|
||||
@@ -7,13 +7,13 @@ import (
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
)
|
||||
|
||||
var reihen_fields = core.NewFieldsList(
|
||||
var einf_fields = core.NewFieldsList(
|
||||
pagemodels.EditorField(pagemodels.F_TEXT),
|
||||
)
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
collection := pageCollection()
|
||||
collection := einfCollection()
|
||||
if err := app.Save(collection); err != nil {
|
||||
app.Logger().Error("Failed to save collection:", "error", err, "collection", collection)
|
||||
return err
|
||||
@@ -32,9 +32,9 @@ func init() {
|
||||
})
|
||||
}
|
||||
|
||||
func pageCollection() *core.Collection {
|
||||
func einfCollection() *core.Collection {
|
||||
c := pagemodels.BasePageCollection(pagemodels.P_EINFUEHRUNG_NAME)
|
||||
c.Fields = append(c.Fields, reihen_fields...)
|
||||
c.Fields = append(c.Fields, einf_fields...)
|
||||
dbmodels.SetBasicPublicRules(c)
|
||||
return c
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package migrations_kontakt
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/pagemodels"
|
||||
@@ -6,13 +6,13 @@ import (
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
)
|
||||
|
||||
var reihen_fields = core.NewFieldsList(
|
||||
var kontakt_fields = core.NewFieldsList(
|
||||
pagemodels.EditorField(pagemodels.F_TEXT),
|
||||
)
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
collection := pageCollection()
|
||||
collection := kontaktCollection()
|
||||
if err := app.Save(collection); err != nil {
|
||||
app.Logger().Error("Failed to save collection:", "error", err, "collection", collection)
|
||||
return err
|
||||
@@ -31,8 +31,8 @@ func init() {
|
||||
})
|
||||
}
|
||||
|
||||
func pageCollection() *core.Collection {
|
||||
func kontaktCollection() *core.Collection {
|
||||
c := pagemodels.BasePageCollection(pagemodels.P_KONTAKT_NAME)
|
||||
c.Fields = append(c.Fields, reihen_fields...)
|
||||
c.Fields = append(c.Fields, kontakt_fields...)
|
||||
return c
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package migrations_literatur
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/dbmodels"
|
||||
@@ -7,13 +7,13 @@ import (
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
)
|
||||
|
||||
var reihen_fields = core.NewFieldsList(
|
||||
var lit_fields = core.NewFieldsList(
|
||||
pagemodels.EditorField(pagemodels.F_TEXT),
|
||||
)
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
collection := pageCollection()
|
||||
collection := litCollection()
|
||||
if err := app.Save(collection); err != nil {
|
||||
app.Logger().Error("Failed to save collection:", "error", err, "collection", collection)
|
||||
return err
|
||||
@@ -32,9 +32,9 @@ func init() {
|
||||
})
|
||||
}
|
||||
|
||||
func pageCollection() *core.Collection {
|
||||
func litCollection() *core.Collection {
|
||||
c := pagemodels.BasePageCollection(pagemodels.P_LIT_NAME)
|
||||
c.Fields = append(c.Fields, reihen_fields...)
|
||||
c.Fields = append(c.Fields, lit_fields...)
|
||||
dbmodels.SetBasicPublicRules(c)
|
||||
return c
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package migrations_reihen
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/dbmodels"
|
||||
@@ -14,7 +14,7 @@ var reihen_fields = core.NewFieldsList(
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
collection := pageCollection()
|
||||
collection := reihenCollection()
|
||||
if err := app.Save(collection); err != nil {
|
||||
app.Logger().Error("Failed to save collection:", "error", err, "collection", collection)
|
||||
return err
|
||||
@@ -33,7 +33,7 @@ func init() {
|
||||
})
|
||||
}
|
||||
|
||||
func pageCollection() *core.Collection {
|
||||
func reihenCollection() *core.Collection {
|
||||
c := pagemodels.BasePageCollection(pagemodels.P_REIHEN_NAME)
|
||||
c.Fields = append(c.Fields, reihen_fields...)
|
||||
dbmodels.SetBasicPublicRules(c)
|
||||
@@ -1,4 +1,4 @@
|
||||
package migrations_danksagungen
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/pagemodels"
|
||||
@@ -1,4 +1,4 @@
|
||||
package migrations_dokumentation
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
@@ -12,9 +12,11 @@ import (
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
)
|
||||
|
||||
const BESCHREIBUNG = "Musenalm: Verzeichnis deutschsprachiger Almanache des 18. und 19. Jahrhunderts. Dokumentation der Sortierung und Struktur der Almanache."
|
||||
const DOK_TITLE = "Benutzerhinweise"
|
||||
|
||||
const START = `<h3>Sortierung der Reihentitel</h3>
|
||||
const DOK_BESCHREIBUNG = "Musenalm: Verzeichnis deutschsprachiger Almanache des 18. und 19. Jahrhunderts. Dokumentation der Sortierung und Struktur der Almanache."
|
||||
|
||||
const DOK_TEXT = `<h3>Sortierung der Reihentitel</h3>
|
||||
<p>Wir sortieren die Reihentitel nach dem Kopf der Nominalphrase, den wir zu diesem Zweck ggf. an den Anfang stellen und mit Kommas abtrennen.</p>
|
||||
<p>Somit wird:</p>
|
||||
<p><em>Wiener Musenalmach</em></p>
|
||||
@@ -494,9 +496,9 @@ func init() {
|
||||
}
|
||||
|
||||
record := pagemodels.NewTextPage(core.NewRecord(collection))
|
||||
record.SetTitle("Benutzerhinweise")
|
||||
record.SetText(START)
|
||||
record.SetDescription(BESCHREIBUNG)
|
||||
record.SetTitle(DOK_TITLE)
|
||||
record.SetText(DOK_TEXT)
|
||||
record.SetDescription(DOK_BESCHREIBUNG)
|
||||
|
||||
if err := app.Save(record); err != nil {
|
||||
app.Logger().Error("Failed to save record", "error", err, "record", record)
|
||||
@@ -1,4 +1,4 @@
|
||||
package migrations_einfuehrung
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/pagemodels"
|
||||
@@ -6,9 +6,11 @@ import (
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
)
|
||||
|
||||
const BESCHREIBUNG = "Musenalm: Einführung in das Verzeichnis deutschsprachiger Almanache."
|
||||
const EINF_NAME = "Einleitung"
|
||||
|
||||
const START = `<h2 class="wp-block-heading">Vorbemerkung</h2>
|
||||
const EINF_BESCHREIBUNG = "Musenalm: Einführung in das Verzeichnis deutschsprachiger Almanache."
|
||||
|
||||
const EINF_TEXT = `<h2 class="wp-block-heading">Vorbemerkung</h2>
|
||||
<p>Dies ist eine Bibliographie der deutschen Almanache und Taschenbücher, die neben der Erfassung der Reihen und ihrer Jahrgänge die Inhalte selbst erkennbar macht. In der Regel werden folgende Merkmale erfaßt und sind in verschiedenen Suchabfragen und Listen abrufbar:</p>
|
||||
<ul>
|
||||
<li>Reihen- und Einzeltitel des Druckwerks sowie Strukturdarstellung des autopsierten Einzelbandes.</li>
|
||||
@@ -42,9 +44,9 @@ func init() {
|
||||
}
|
||||
|
||||
record := pagemodels.NewTextPage(core.NewRecord(collection))
|
||||
record.SetTitle("Einleitung")
|
||||
record.SetText(START)
|
||||
record.SetDescription(BESCHREIBUNG)
|
||||
record.SetTitle(EINF_NAME)
|
||||
record.SetText(EINF_TEXT)
|
||||
record.SetDescription(EINF_BESCHREIBUNG)
|
||||
|
||||
if err := app.Save(record); err != nil {
|
||||
app.Logger().Error("Failed to save record", "error", err, "record", record)
|
||||
@@ -1,4 +1,4 @@
|
||||
package migrations_kontakt
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/pagemodels"
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
)
|
||||
|
||||
const START = `<p>Martin Sietzen und Dr. Jakob Brüssermann<br>Theodor-Springmann-Stiftung<br>Hirschgasse 2 <br><br>69120 Heidelberg<br><a href="mailto:info@musenalm.de">info@musenalm.de</a></p>`
|
||||
|
||||
const BESCHREIBUNG = "Musenalm: Verzeichnis deutschsprachiger Almanache des 18. und 19. Jahrhunderts. Kontakt zur Redaktion."
|
||||
const TITLE_KONTAKT = "Kontakt"
|
||||
const TEXT_KONTAKT = `<p>Martin Sietzen und Dr. Jakob Brüssermann<br>Theodor-Springmann-Stiftung<br>Hirschgasse 2 <br><br>69120 Heidelberg<br><a href="mailto:info@musenalm.de">info@musenalm.de</a></p>`
|
||||
const BESCHREIBUNG_KONTAKT = "Musenalm: Verzeichnis deutschsprachiger Almanache des 18. und 19. Jahrhunderts. Kontakt zur Redaktion."
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
@@ -20,9 +20,9 @@ func init() {
|
||||
}
|
||||
|
||||
record := pagemodels.NewTextPage(core.NewRecord(collection))
|
||||
record.SetTitle("Kontakt")
|
||||
record.SetText(START)
|
||||
record.SetDescription(BESCHREIBUNG)
|
||||
record.SetTitle(TITLE_KONTAKT)
|
||||
record.SetText(TEXT_KONTAKT)
|
||||
record.SetDescription(BESCHREIBUNG_KONTAKT)
|
||||
|
||||
if err := app.Save(record); err != nil {
|
||||
app.Logger().Error("Failed to save record", "error", err, "record", record)
|
||||
@@ -1,4 +1,4 @@
|
||||
package migrations_literatur
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/pagemodels"
|
||||
@@ -6,9 +6,11 @@ import (
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
)
|
||||
|
||||
const BESCHREIBUNG = "Musenalm: Verzeichnis deutschsprachiger Almanache des 18. und 19. Jahrhunderts. Weiterführende Literatur zum Almanachwesen."
|
||||
const LIT_NAME = "Literatur"
|
||||
|
||||
const START = `<h2>Ausstellungs- und Bibliothekskataloge</h2>
|
||||
const LIT_BESCHREIBUNG = "Musenalm: Verzeichnis deutschsprachiger Almanache des 18. und 19. Jahrhunderts. Weiterführende Literatur zum Almanachwesen."
|
||||
|
||||
const LIT_TEXT = `<h2>Ausstellungs- und Bibliothekskataloge</h2>
|
||||
<p><span style="font-variant: small-caps;">Baumgärtel</span>, Ehrfried (Hg.): <em>Die Almanache, Kalender und Taschenbücher (1750–1860) der Landesbibliothek Coburg.</em> Wiesbaden 1970.</p>
|
||||
<p><span style="font-variant: small-caps;">Bernhardt</span>, Ursula; <span style="font-variant: small-caps;">Reuter-Rautenberg</span>, <span style="text-decoration: none;">Anneliese (Hgg.): </span><em>Bild und Buch. Rheinblüthen, Moosrosen und Vergißmeinnicht: Taschenbücher für Frauenzimmer von Bildung</em>. Eine Studioausstellung in Zusammenarbeit mit der Badischen Landesbiliothek. Staatliche Kunsthalle Karlsruhe 1995.</p>
|
||||
<p><span style="font-variant: small-caps;">Braunbehrens</span>, Adrian et al. (Hgg.): <em>Kalender im Wandel der Zeiten. Eine Ausstellung der Badischen Landesbibliothek zur Erinnerung an die Kalenderreform durch Papst Gregor XIII. im Jahr 1582.</em> Ausstellungskatalog, Bad. Landesbibliothek 1982.</p>
|
||||
@@ -125,9 +127,9 @@ func init() {
|
||||
}
|
||||
|
||||
record := pagemodels.NewTextPage(core.NewRecord(collection))
|
||||
record.SetTitle("Literatur")
|
||||
record.SetText(START)
|
||||
record.SetDescription(BESCHREIBUNG)
|
||||
record.SetTitle(LIT_NAME)
|
||||
record.SetText(LIT_TEXT)
|
||||
record.SetDescription(LIT_BESCHREIBUNG)
|
||||
|
||||
return app.Save(record)
|
||||
}, func(app core.App) error {
|
||||
55
migrations/1739446703_insert_data_reihen.go
Normal file
55
migrations/1739446703_insert_data_reihen.go
Normal file
@@ -0,0 +1,55 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/pagemodels"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem"
|
||||
)
|
||||
|
||||
const INDEX_NAME = "Musenalm"
|
||||
|
||||
const INDEX_BESCHREIBUNG = "Musenalm: Verzeichnis deutschsprachiger Almanache des 18. und 19. Jahrhunderts. Reihenverzeichnis."
|
||||
|
||||
const INDEX_TEXT = "<p>Ziel der Musenalm ist die bibliographische Erfassung eines Jahrhunderts deutscher Almanache und Taschenbücher;<strong> </strong>das Projekt ist im Aufbau und wird kontinuierlich weitergeführt.</p><p>Verzeichnet werden:</p><ul><li><strong>Reihen </strong>und<strong> Bände</strong> bekannter Almanache und einzelne Druckauflagen mit ausführlichen bibliographischen Angaben und kurzer systematisierter <strong>Darstellung ihres strukturellen Aufbaus </strong> (Paginierung, Anordnung der Druckteile, Graphiken und Beilagen),<strong><br></strong></li><li><strong>Beiträge literarisch oder musisch ausgerichteter Almanache </strong>einzeln, nach Autor, Überschrift und Incipit,<strong> </strong>inklusive<strong> Digitalisate </strong>graphischer und musischer Beiträge,</li><li>Beiträge vorwiegend <strong>nicht literarischer Almanache</strong> in der Regel durch Wiedergabe des <strong>Inhaltsverzeichnisses.</strong></li></ul><p>Die Bibliographie ist zugänglich mit umfangreichen Suchfunktionen über:</p><ul><li><strong>Reihentitel der Almanache,</strong></li><li><strong>Abbildungen (Graphiken und Musikbeilagen),</strong></li><li>Personennamen von Herausgebern und Beiträgern einerseits über normierte<strong> Realnamen </strong>und andererseits über die im Druck erscheinenden Schreibweisen der Personen (auch Pseudonyme)<strong> </strong>als<strong> Autornamen,</strong></li><li><strong>Einzeltitel und Incipit </strong>(wörtliche Textanfänge) von Beiträgen.</li></ul><p>Die Musenalm ist ein Projekt der Theodor Springmann Stiftung in Heidelberg.</p>"
|
||||
|
||||
const START_BILD = "./import/Static-Bilder/musen.png"
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
collection, err := app.FindCollectionByNameOrId(
|
||||
pagemodels.GeneratePageTableName(pagemodels.P_REIHEN_NAME))
|
||||
if err != nil {
|
||||
app.Logger().Error("Could not find Table Reihen! You need to execute table migrations first!")
|
||||
return err
|
||||
}
|
||||
|
||||
record := pagemodels.NewReihen(core.NewRecord(collection))
|
||||
record.SetTitle(INDEX_NAME)
|
||||
record.SetText(INDEX_TEXT)
|
||||
record.SetDescription(INDEX_BESCHREIBUNG)
|
||||
|
||||
img, err := filesystem.NewFileFromPath(START_BILD)
|
||||
if err != nil {
|
||||
app.Logger().Error("Failed to read image file", "error", err, "path", START_BILD)
|
||||
return err
|
||||
}
|
||||
|
||||
record.SetImage(img)
|
||||
|
||||
if err := app.Save(record); err != nil {
|
||||
app.Logger().Error("Failed to save record", "error", err, "record", record)
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}, func(app core.App) error {
|
||||
coll, err := app.FindCollectionByNameOrId(
|
||||
pagemodels.GeneratePageTableName(pagemodels.P_REIHEN_NAME))
|
||||
|
||||
if err == nil && coll != nil {
|
||||
app.DB().NewQuery("DELETE FROM " + coll.TableName()).Execute()
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
@@ -7,14 +7,6 @@ import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/helpers"
|
||||
_ "github.com/Theodor-Springmann-Stiftung/musenalm/migrations"
|
||||
_ "github.com/Theodor-Springmann-Stiftung/musenalm/pages"
|
||||
_ "github.com/Theodor-Springmann-Stiftung/musenalm/pages/migrations_danksagungen"
|
||||
_ "github.com/Theodor-Springmann-Stiftung/musenalm/pages/migrations_dokumentation"
|
||||
_ "github.com/Theodor-Springmann-Stiftung/musenalm/pages/migrations_einfuehrung"
|
||||
_ "github.com/Theodor-Springmann-Stiftung/musenalm/pages/migrations_index"
|
||||
_ "github.com/Theodor-Springmann-Stiftung/musenalm/pages/migrations_kontakt"
|
||||
_ "github.com/Theodor-Springmann-Stiftung/musenalm/pages/migrations_lesekabinett"
|
||||
_ "github.com/Theodor-Springmann-Stiftung/musenalm/pages/migrations_literatur"
|
||||
_ "github.com/Theodor-Springmann-Stiftung/musenalm/pages/migrations_reihen"
|
||||
"github.com/pocketbase/pocketbase/plugins/migratecmd"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
package migrations_reihen
|
||||
|
||||
import (
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/pagemodels"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem"
|
||||
)
|
||||
|
||||
const DESCRIPTION = "Musenalm: Verzeichnis deutschsprachiger Almanache des 18. und 19. Jahrhunderts. Reihenverzeichnis."
|
||||
|
||||
const START = "<p>Ziel der Musenalm ist die bibliographische Erfassung eines Jahrhunderts deutscher Almanache und Taschenbücher;<strong> </strong>das Projekt ist im Aufbau und wird kontinuierlich weitergeführt.</p><p>Verzeichnet werden:</p><ul><li><strong>Reihen </strong>und<strong> Bände</strong> bekannter Almanache und einzelne Druckauflagen mit ausführlichen bibliographischen Angaben und kurzer systematisierter <strong>Darstellung ihres strukturellen Aufbaus </strong> (Paginierung, Anordnung der Druckteile, Graphiken und Beilagen),<strong><br></strong></li><li><strong>Beiträge literarisch oder musisch ausgerichteter Almanache </strong>einzeln, nach Autor, Überschrift und Incipit,<strong> </strong>inklusive<strong> Digitalisate </strong>graphischer und musischer Beiträge,</li><li>Beiträge vorwiegend <strong>nicht literarischer Almanache</strong> in der Regel durch Wiedergabe des <strong>Inhaltsverzeichnisses.</strong></li></ul><p>Die Bibliographie ist zugänglich mit umfangreichen Suchfunktionen über:</p><ul><li><strong>Reihentitel der Almanache,</strong></li><li><strong>Abbildungen (Graphiken und Musikbeilagen),</strong></li><li>Personennamen von Herausgebern und Beiträgern einerseits über normierte<strong> Realnamen </strong>und andererseits über die im Druck erscheinenden Schreibweisen der Personen (auch Pseudonyme)<strong> </strong>als<strong> Autornamen,</strong></li><li><strong>Einzeltitel und Incipit </strong>(wörtliche Textanfänge) von Beiträgen.</li></ul><p>Die Musenalm ist ein Projekt der Theodor Springmann Stiftung in Heidelberg.</p>"
|
||||
|
||||
const START_BILD = "./import/Static-Bilder/musen.png"
|
||||
|
||||
func init() {
|
||||
m.Register(func(app core.App) error {
|
||||
collection, err := app.FindCollectionByNameOrId(
|
||||
pagemodels.GeneratePageTableName(pagemodels.P_REIHEN_NAME))
|
||||
if err != nil {
|
||||
app.Logger().Error("Could not find Table Reihen! You need to execute table migrations first!")
|
||||
return err
|
||||
}
|
||||
|
||||
record := pagemodels.NewReihen(core.NewRecord(collection))
|
||||
record.SetTitle("Musenalm")
|
||||
record.SetText(START)
|
||||
record.SetDescription(DESCRIPTION)
|
||||
|
||||
img, err := filesystem.NewFileFromPath(START_BILD)
|
||||
if err != nil {
|
||||
app.Logger().Error("Failed to read image file", "error", err, "path", START_BILD)
|
||||
return err
|
||||
}
|
||||
|
||||
record.SetImage(img)
|
||||
|
||||
if err := app.Save(record); err != nil {
|
||||
app.Logger().Error("Failed to save record", "error", err, "record", record)
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}, func(app core.App) error {
|
||||
coll, err := app.FindCollectionByNameOrId(
|
||||
pagemodels.GeneratePageTableName(pagemodels.P_REIHEN_NAME))
|
||||
|
||||
if err == nil && coll != nil {
|
||||
app.DB().NewQuery("DELETE FROM " + coll.TableName()).Execute()
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user