Serenity: update serenity after removing somedata column from sql

Created on 1 Jun 2020  路  3Comments  路  Source: serenity-is/Serenity

I made some changes from sql server..I removed some data coloum from there.After that I try to run serenity project I get some errors about this changes.It can not find this deleted coloums.How can 谋 solve this and update coloums in project?

Most helpful comment

@snur1996 @edwardch
You can also run Sergen - as long as you have KDiff3 configured in your options .. you can then edit and save or discard changes ..

All 3 comments

It's advisable to put all database schema changes into migrations, including removing columns. Unless you already have another way of maintaining your database schema.

First add a migration to remove the column, with the following code:

Delete.Column("OldColumn").FromTable("XYZ");

Then remove the references to your OldColumn inside

  • xyzRow.cs
  • xyzForm.cs
  • xyzColumns.cs

You'll want to rebuild & run your project, and run T4 transformations if you're on an older version of Serenity.

That's pretty much it, unless you have references to your OldColumn inside other helpers, which your IDE will complain about when you try to build and run your project anyway.

HTH.
Edward

@snur1996 @edwardch
You can also run Sergen - as long as you have KDiff3 configured in your options .. you can then edit and save or discard changes ..

Closed due inactivity

Also check the issue guidelines.
If you still need help, you can ask this on stackoverflow with our new tag.
https://stackoverflow.com/tags/serenity-platform

Was this page helpful?
0 / 5 - 0 ratings

Related issues

newyearsoft picture newyearsoft  路  3Comments

ahsansolution picture ahsansolution  路  3Comments

AmuthaKondusamy picture AmuthaKondusamy  路  3Comments

dudeman972 picture dudeman972  路  3Comments

chintankukadiya18 picture chintankukadiya18  路  3Comments