AW: [gentle-devel] AW: ALTER support
Brought to you by:
mnmr
From: <Gr...@mi...> - 2005-03-18 11:06:23
|
> -----Urspr=FCngliche Nachricht----- > Von: gop...@li...=20 > [mailto:gop...@li...] Im Auftrag=20 > von Morten Mertner > Gesendet: Freitag, 18. M=E4rz 2005 04:31 > An: gop...@li... > Betreff: Re: [gentle-devel] AW: ALTER support >=20 >=20 > I propose that we elect Alexander as owner of the page, and=20 > move the discussion there. Alex, if you accept, you'll be=20 > responsible for merging in comments (and removing them once=20 > they are obsolete). Ok, thanks. Until we have a nice solution to all problems, I prefer to = discuss it on the mailing list. > Note to all: everybody can edit the page, so if you want to=20 > add something by editing instead of commenting, that is also=20 > an option. Just don't abuse it to re-edit the spec to fit=20 > your own specific needs or desires ;-) Ok, for now, we have two solutions: 1) Using Table.TableId and Colum.ColumnId, stored as attributes and in = the revision table which gets created by Gentle. No revision history = will be recorded in the revisions-table or as attributes. Only = forward-upgrading is possible, but the GUIDs make it safe, no = ambiguities can occur. 2) Using several Revision attributes, each for every version, that track = how the tables/fields evolve. Advantages: Auto-documenting of the = history, forward/backward-updating would be possible (however it doesnt = need to be implemented). Disadvantages: Higher risk of ambiguities , = changing order of columns not so easy. How is dropping columns or tables = achieved? Simply marking them as deprecated and never using the = classes/marking the fields "private"? Other problems: What happens to dropping fields/tables: Proposal: Only allow dropping fields if (SELECT COUNT(FieldToDrop) from TableName WHERE FieldToDrop IS NOT NULL) = =3D 0 Only allow dropping tables if (SELECT COUNT(*) FROM TableToDrop) =3D 0 Other solution: Simply drop the field/table, even if it contains data/rows. > Once the spec is final, I'll move it to somewhere in the=20 > Gentle space, as part of the upcoming "documenting the=20 > internals" content. >=20 > Yours, > Morten |