cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanjay Tripathi <sanjay.tripa...@citrix.com>
Subject RE: Merge 4.1-new-db-schema.sql to db/db/schema-40to410.sql
Date Mon, 18 Feb 2013 11:12:53 GMT


> -----Original Message-----
> From: rohityadav89@gmail.com [mailto:rohityadav89@gmail.com] On Behalf
> Of Rohit Yadav
> Sent: Saturday, February 16, 2013 12:50 PM
> To: Min Chen
> Cc: Edison Su; cloudstack-dev@incubator.apache.org; Sheng Yang; Alex
> Huang; Kishan Kavala
> Subject: Re: Merge 4.1-new-db-schema.sql to db/db/schema-40to410.sql
> 
> On Fri, Feb 15, 2013 at 11:43 PM, Min Chen <min.chen@citrix.com> wrote:
> > Rohit, scripts run in create-schema-view.sql have been included  in
> > schema-40to410.sql. I will take care of removing
> > create-schema-view.sql today.
> 
> Thanks Min, can you just recheck if they in sync, i.e. all rules in create-
> schema-view are in schema-40to410?
> Let's do one thing we can still keep it for 5.0 and till then have all new
> updates synced to schema upgrade sqls, the only extra work would be to
> sync the create-schema-view with the upgrade sql files.

So, if want to add new fields into the existing view, which one of the following is the good
approach to follow in upgrade sql file:
1) use ALTER VIEW
2) use CREATE OR REPLACE VIEW
3) drop the existing view and create a new one with the addition of new requited fields.

Pls provide your suggestions on this.

Regards,
Sanjsy
> 
> Regards.
> 
> >
> > Thanks
> > -min
> >
> > On 2/15/13 2:58 AM, "Rohit Yadav" <bhaisaab@apache.org> wrote:
> >
> >>Edison, you'd created a 4.1-new-db-schema sql, may I merge
> >>4.1-new-db-schema.sql  to db/db/schema-40to410.sql? We'll also need a
> >>db/db/schema-40to410-cleanup.sql and upgrading class.
> >>
> >>There is some difference between the 4.0 create-schema.sql and that in
> >>4.1: http://people.apache.org/~bhaisaab/diff-create-schema-40-41.sql
> >>
> >>Alex suggested in last discussion that we should not change the schema
> >>file and have upgrade paths and cleanup paths. This would help us do
> >>rolling upgrades. But Alex, there are a lot of difference between the
> >>4.0 schema and 4.1 schema sqls (about 4k lines of diff):
> >>http://people.apache.org/~bhaisaab/diff4041sqls.sql If we don't want
> >>developers to change anything in the schema files, how do you propose
> >>we fix it now for 4.1? Move all these changes to 40to41 sql?
> >>
> >>Sheng (ipv6), Kishan (regions), Vijay (autoscale) I see some create
> >>schema changes, should we move them to db/db/schema-40to410.sql?
> >>
> >>Min, the create-schema-view did not exist for 4.0, should we keep it
> >>as it as, our move it as upgrade path?
> >>
> >>For 4.1, we should do following changes so DatabaseCreator could be
> >>refactored and used starting 4.2/master:
> >>- Change version to 4.0 in create-schema
> >>- Make sure there is difference between 4.0 and 4.1 create-schema sqls
> >>- Move new additions to db/db/schema-40to410.sql, define a cleanup
> >>path/sql and upgrading class from 40-41
> >>- Fix cloudstack-setup-databases, for 4.1 we won't use
> >>databasecreator, stick with the present script (won't risk regressions
> >>and whatnot)
> >>
> >>Regards.
> >

Mime
View raw message