Merge pull request #115 from AlanAlanAlanXu/main

添加数据库初始化和ent生成文件
This commit is contained in:
Yoko
2025-07-21 16:56:52 +08:00
committed by GitHub
2 changed files with 6 additions and 3 deletions

View File

@@ -261,11 +261,11 @@ func init() {
// task.DefaultIsSuggested holds the default value on creation for the is_suggested field.
task.DefaultIsSuggested = taskDescIsSuggested.Default.(bool)
// taskDescCreatedAt is the schema descriptor for created_at field.
taskDescCreatedAt := taskFields[14].Descriptor()
taskDescCreatedAt := taskFields[17].Descriptor()
// task.DefaultCreatedAt holds the default value on creation for the created_at field.
task.DefaultCreatedAt = taskDescCreatedAt.Default.(func() time.Time)
// taskDescUpdatedAt is the schema descriptor for updated_at field.
taskDescUpdatedAt := taskFields[15].Descriptor()
taskDescUpdatedAt := taskFields[18].Descriptor()
// task.DefaultUpdatedAt holds the default value on creation for the updated_at field.
task.DefaultUpdatedAt = taskDescUpdatedAt.Default.(func() time.Time)
// task.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.

View File

@@ -1,3 +1,6 @@
ALTER TABLE tasks ADD column is_suggested boolean default false;
ALTER TABLE task_records ADD column code_lines int default 0;
ALTER TABLE task_records ADD column code text;
ALTER TABLE task_records ADD column code text;
ALTER TABLE tasks ADD column source_code text;
ALTER TABLE tasks ADD column cursor_position bigint;
ALTER TABLE tasks ADD column user_input text;