Hallo Thomas, Die Sache ist, das ich die Migration als ich merkte das mir rake abbricht, händisch aus meinen Projekt gelöscht hatte. In meinem Jugendlichen Leichtsinn dachte ich, die Tabellenstruktur ist noch nicht verändert, commitet habe ich die Migration noch nicht, also weg damit. Ob das Clever war, ich weiß es nicht. Dies ist mein erster richtiger Kontakt mit Ruby On Rails und Git als Versionsverwaltung > >
On Freitag, 29. April 2011 at 08:49, Thomas von Deyen wrote: Wie ist denn der github Link? > > ...deshalb ist in meinen github repository nur die "neue" Migration. Und die funktioniert ja dank dem rake db:migrate:reset > Dann könnte man mal rüberschauen. > So ist dat schwierig ;) Wenn du immernoch über das Projekt schauen möchtest, sende ich dir den Link gerne. Gruß, Sebastian () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments > Gruß > > Thomas von Deyen > > (von meinem iPhone gesendet) > > mobile +49 (0)179 492 3992 > > Save the environment: > > Before printing this email, > please assess if it is really > needed! > > > Am 29.04.2011 um 01:28 schrieb Sebastian Bachmann > <sebastianbachm...@macnews.de>: > > > Guude Liste, > > > > ich konnte mein Problem lösen. > > > > Ich hatte 3 pending migrations. Wie es dazu kam kann ich nur vermuten. Ich > > habe mein Projekt zum einen bei Github und zum anderen bei der > > Projektmanagement Webapplikation plan.io. Für plan.io habe ich ein zweites > > remote angelegt, aber meine Änderungen nur mit einem git push versehen. Ich > > hätte hier jeweils noch die Namen der Remotes angeben müssen, oder? > > > > Wie dem auch sei, ich habe das plan.io remote nun gelöscht und dann mit > > rake db:migrate:reset mein pending migrations Problem behoben. Nun läuft > > wieder alles und ich kann Änderungen an meinen Datenmodellen vornehmen. > > > > Wäre super wenn der ein oder andere erfahrene Rails Anwender der hier > > mitliest mal kurz kommentieren könnte ob mein Vorgehen so in Ordnung war. > > > > Gute Nacht! > > Sebastian > > > > () ascii ribbon campaign - against html e-mail > > /\ www.asciiribbon.org - against proprietary attachments > > On Donnerstag, 28. April 2011 at 22:52, Sebastian Bachmann wrote: > > > Guude, > > > > > > das Migrationsfile scheint mir aber richtig zu sein, dort steht > > > _add_column :reports, :customer_appointment, :date_ > > > > > > Kann es möglich sein, da sich rake db:migrate an dem :customer stoert? > > > > > > Gruß, > > > Sebastian > > > > > > > > > () ascii ribbon campaign - against html e-mail > > > /\ www.asciiribbon.org - against proprietary attachments > > > On Donnerstag, 28. April 2011 at 22:31, Sebastian Bachmann wrote: > > > > Guude, > > > > > > > > mein Projekt beinhaltet 4 Datenmodelle. Technician, Report, Customer, > > > > Device, Ich wollte Report noch ein Feld customer_appointment:date > > > > hinzufügen. Dazu habe ich folgende Migration generiert: > > > > > > > > _rails g migration AddCustomerAppointmentToReport > > > > customer_appointment:date_ > > > > > > > > ein _rake db:migrate_ brachte mir diese Fehlermeldung > > > > > > > > == CreateCustomers: migrating > > > > ================================================ > > > > -- create_table(:customers) > > > > rake aborted! > > > > An error has occurred, this and all later migrations canceled: > > > > > > > > SQLite3::SQLException: table "customers" already exists: CREATE TABLE > > > > "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" > > > > varchar(255), "email" varchar(255), "customer_number" varchar(255), > > > > "contact_person" varchar(255), "street" varchar(255), "zip_code" > > > > integer, "location" varchar(255), "country" varchar(255), "created_at" > > > > datetime, "updated_at" datetime) > > > > > > > > > > > > Ich habe beim erstellen der Migration wohl eine Konvention verletzt?! > > > > Es hätte wohl > > > > > > > > _rails g migration AddAppointmentToReports customer_appointment:date_ > > > > lauten müssen?! Also das Datenmodell am Ende, plural ... > > > > > > > > Meine Frage ist nun wie gehe ich vor? Da rake db:migrate nicht > > > > durchgelaufen ist, und an der Tabellestruktur nichts verändert wurde, > > > > habe ich die Migration manuell gelöscht. Danach habe ich noch eine > > > > Migration erstellt > > > > rails g migration AddAppointmentToReports customer_appointment:date > > > > aber die Fehlermeldung bleibt bestehen. > > > > > > > > In den RailsGuides[1] steht etwas von einem Rollback wenn man Mist > > > > gebaut hat. Ich finde das treffend, würde mich aber gerne > > > > rückversichern. > > > > > > > > Danke für die Antwort! > > > > > > > > Gruß, > > > > Sebastian > > > > > > > > [1] http://guides.rubyonrails.org/migrations.html#rolling-back > > > > > > > > > > > > > > > > > > > > > > > > () ascii ribbon campaign - against html e-mail > > > > /\ www.asciiribbon.org - against proprietary attachments > > > > _______________________________________________ > > > > rubyonrails-ug mailing list > > > > rubyonrails-ug@headflash.com > > > > http://mailman.headflash.com/listinfo/rubyonrails-ug > > > > > > > _______________________________________________ > > > rubyonrails-ug mailing list > > > rubyonrails-ug@headflash.com > > > http://mailman.headflash.com/listinfo/rubyonrails-ug > > > > > _______________________________________________ > > rubyonrails-ug mailing list > > rubyonrails-ug@headflash.com > > http://mailman.headflash.com/listinfo/rubyonrails-ug > _______________________________________________ > rubyonrails-ug mailing list > rubyonrails-ug@headflash.com > http://mailman.headflash.com/listinfo/rubyonrails-ug >
_______________________________________________ rubyonrails-ug mailing list rubyonrails-ug@headflash.com http://mailman.headflash.com/listinfo/rubyonrails-ug