views:

215

answers:

4

Hi, I want to know that How to Insert New Columns to an existing database Table using Subsonic 3.0.0.5 MIGRATIONS.

Basically I want to alter an existing table in MS SqlServer database and add three more columns into it.

Please tell me How I will be able to do it

Regards,

Naveed Khan

+1  A: 

Just change your object and the column will be added/updated whatever. So if you have an object called "Post" and add a property, it will be added as a column in the DB.

See this video...

http://subsonicproject.com/docs/Simple_Repo_5_Minute_Demo

Rob Conery
A: 

I tried this but I ended up with a new table added in database.

How to Resolve this.

Regards

A: 

I am making a class with a name of

AccountInformation

but it is creating a table with the name of AccountInformations

Why is it so and How to resolve this.

Regards

A: 

It has to do with the conventions of SubSonic.
As the object is singular, it adds the plural to the table (or expects the table to be plural).
So it will expect an object called Order to map to a table called Orders.

There is only two solutions that I can see for you

1) Rename you table to the plural name.

2) Modify Subsonic code to remove the adding of the plural.

Podge