Skip to content

Commit

Permalink
fix: use varchar instead of (deprecated) text column type for MSSQL s…
Browse files Browse the repository at this point in the history
…chema (#455)

* Updated the MSSQL schema to not use the (deprecated) `text` data type.
* Use `varchar(5)` since, the max length is 50 according to
#453
* Some alignment in casing and spacing

## Fixes
#454

## Reminders
- [ ] Added/ran automated tests
- [ ] Update README and/or examples
- [x] Ran `mvn spotless:apply`
  • Loading branch information
aukevanleeuwen committed Jan 13, 2024
1 parent 7798c35 commit a27383a
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions db-scheduler/src/test/resources/mssql_tables.sql
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
create table scheduled_tasks (
task_name varchar(250) not null,
task_instance varchar(250) not null,
task_data nvarchar(max),
execution_time datetimeoffset not null,
picked bit,
picked_by text,
last_success datetimeoffset ,
last_failure datetimeoffset ,
consecutive_failures INT,
last_heartbeat datetimeoffset ,
[version] BIGINT not null,
PRIMARY KEY (task_name, task_instance),
INDEX execution_time_idx (execution_time),
INDEX last_heartbeat_idx (last_heartbeat)
)
create table scheduled_tasks
(
task_name varchar(250) not null,
task_instance varchar(250) not null,
task_data nvarchar(max),
execution_time datetimeoffset not null,
picked bit,
picked_by varchar(50),
last_success datetimeoffset,
last_failure datetimeoffset,
consecutive_failures int,
last_heartbeat datetimeoffset,
[version] bigint not null,
primary key (task_name, task_instance),
index execution_time_idx (execution_time),
index last_heartbeat_idx (last_heartbeat)
)

0 comments on commit a27383a

Please sign in to comment.