Database migration records

Source: Internet
Author: User

In the process of using Castle activerecord for software development, in order to achieve database migration, you must note that, otherwise,ProgramThese problems may end suddenly but cannot be predicted. Therefore, pay attention to the following points:

1. The data length must be accurately defined. If it cannot be determined, it would be longer or shorter.

Symptom: In sqlserver, if the field length is smaller than the actual data length, the database automatically truncates it, but an exception is thrown in PostgreSQL.

2. Select the binary data type.

Symptom: if the "binaryblob" data type is defined for a field, everything is normal in sqlserver, but after data is saved in PostgreSQL, it is read to the memory, the length is twice the length of the original data. The cause is not found.

Solution: Define the field as the "stringclob" data type and convert it when using it to shield the differences between different databases.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.