Closed zl15074769846 closed 6 months ago
If I want to split tables, what is a good way to create indexes? The orm method is not user-friendly and At the beginning, there was no addition of union unique or unique attributes. Subsequent additions using the orm method will not take effect, and the database cannot update field attributes. Is there currently a good way to add union unique and unique attributes
You should drop useless indexes manually.
Table constraints and column constraints can not be changed if you have created the table. This is the limitation of SQLite. You should drop the table and recreate it if you really want to change the table constraints or existing column constraints.
The language of WCDB
The version of WCDB
The platform of WCDB
The installation of WCDB
@WCDBTableCoding // (multiUnique = @MultiUnique(columns = {"nick_name", "avatar"})) public class MgImUser implements Serializable{ //只支持绑定 public 的属性 @WCDBField(isAutoIncrement = true,isPrimary = true) public long id; @WCDBField(isUnique = false) // @WCDBIndex(name="userinfo_indexSessionId") public String session_id; @WCDBField(isUnique = false) public String nick_name; @WCDBField(isUnique = true,columnName ="AVATAR") public String avatar;
What's the issue?
After using version 2.1.4, Android found that using the ORM mapping table structure, if the union unique attribute or index attribute is removed, the database will not synchronously remove the union unique and index attributes. At the same time, when using the union unique configuration, if the table field name and naming are different, the union unique attribute naming will report an error regardless of whether the field name or naming is used