123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697 |
- /*
- SnailJob Database Transfer Tool
- Source Server Type : MySQL
- Target Server Type : Microsoft SQL Server
- Date: 2024-05-13 23:03:34
- */
- -- sj_namespace
- CREATE TABLE sj_namespace
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- name nvarchar(64) NOT NULL,
- unique_id nvarchar(64) NOT NULL,
- description nvarchar(256) NOT NULL DEFAULT '',
- deleted tinyint NOT NULL DEFAULT 0,
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE INDEX idx_sj_namespace_01 ON sj_namespace (name)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_namespace',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_namespace',
- 'COLUMN', N'name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'唯一id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_namespace',
- 'COLUMN', N'unique_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'描述',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_namespace',
- 'COLUMN', N'description'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'逻辑删除 1、删除',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_namespace',
- 'COLUMN', N'deleted'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_namespace',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_namespace',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_namespace'
- GO
- INSERT INTO sj_namespace(name, unique_id, description, deleted, create_dt, update_dt) VALUES (N'Development', N'dev', N'', 0, getdate(), getdate())
- GO
- INSERT INTO sj_namespace(name, unique_id, description, deleted, create_dt, update_dt) VALUES (N'Production', N'prod', N'', 0, getdate(), getdate())
- GO
- -- sj_group_config
- CREATE TABLE sj_group_config
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- group_name nvarchar(64) NOT NULL DEFAULT '',
- description nvarchar(256) NOT NULL DEFAULT '',
- token nvarchar(64) NOT NULL DEFAULT 'SJ_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT',
- group_status tinyint NOT NULL DEFAULT 0,
- version int NOT NULL,
- group_partition int NOT NULL,
- id_generator_mode tinyint NOT NULL DEFAULT 1,
- init_scene tinyint NOT NULL DEFAULT 0,
- bucket_index int NOT NULL DEFAULT 0,
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE UNIQUE INDEX uk_sj_group_config_01 ON sj_group_config (namespace_id, group_name)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_group_config',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_group_config',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_group_config',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组描述',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_group_config',
- 'COLUMN', N'description'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'token',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_group_config',
- 'COLUMN', N'token'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组状态 0、未启用 1、启用',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_group_config',
- 'COLUMN', N'group_status'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'版本号',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_group_config',
- 'COLUMN', N'version'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'分区',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_group_config',
- 'COLUMN', N'group_partition'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'唯一id生成模式 默认号段模式',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_group_config',
- 'COLUMN', N'id_generator_mode'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'是否初始化场景 0:否 1:是',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_group_config',
- 'COLUMN', N'init_scene'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'bucket',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_group_config',
- 'COLUMN', N'bucket_index'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_group_config',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_group_config',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组配置',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_group_config'
- GO
- INSERT INTO sj_group_config(namespace_id, group_name, description, token, group_status, version, group_partition, id_generator_mode, init_scene, bucket_index, create_dt, update_dt) VALUES (N'dev', N'ruoyi_group', N'', N'SJ_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT', N'1', N'1', N'0', N'1', N'1', N'4', getdate(), getdate())
- GO
- -- sj_notify_config
- CREATE TABLE sj_notify_config
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- group_name nvarchar(64) NOT NULL,
- business_id nvarchar(64) NOT NULL,
- system_task_type tinyint NOT NULL DEFAULT 3,
- notify_status tinyint NOT NULL DEFAULT 0,
- recipient_ids nvarchar(128) NOT NULL,
- notify_threshold int NOT NULL DEFAULT 0,
- notify_scene tinyint NOT NULL DEFAULT 0,
- rate_limiter_status tinyint NOT NULL DEFAULT 0,
- rate_limiter_threshold int NOT NULL DEFAULT 0,
- description nvarchar(256) NOT NULL DEFAULT '',
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE INDEX idx_sj_notify_config_01 ON sj_notify_config (namespace_id, group_name, business_id)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_config',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_config',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_config',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'业务id ( job_id或workflow_id或scene_name ) ',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_config',
- 'COLUMN', N'business_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务类型 1. 重试任务 2. 重试回调 3、JOB任务 4、WORKFLOW任务',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_config',
- 'COLUMN', N'system_task_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'通知状态 0、未启用 1、启用',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_config',
- 'COLUMN', N'notify_status'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'接收人id列表',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_config',
- 'COLUMN', N'recipient_ids'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'通知阈值',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_config',
- 'COLUMN', N'notify_threshold'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'通知场景',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_config',
- 'COLUMN', N'notify_scene'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'限流状态 0、未启用 1、启用',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_config',
- 'COLUMN', N'rate_limiter_status'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'每秒限流阈值',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_config',
- 'COLUMN', N'rate_limiter_threshold'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'描述',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_config',
- 'COLUMN', N'description'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_config',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_config',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'通知配置',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_config'
- GO
- -- sj_notify_recipient
- CREATE TABLE sj_notify_recipient
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- recipient_name nvarchar(64) NOT NULL,
- notify_type tinyint NOT NULL DEFAULT 0,
- notify_attribute nvarchar(512) NOT NULL,
- description nvarchar(256) NOT NULL DEFAULT '',
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE INDEX idx_sj_notify_recipient_01 ON sj_notify_recipient (namespace_id)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_recipient',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_recipient',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'接收人名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_recipient',
- 'COLUMN', N'recipient_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'通知类型 1、钉钉 2、邮件 3、企业微信 4 飞书',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_recipient',
- 'COLUMN', N'notify_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'配置属性',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_recipient',
- 'COLUMN', N'notify_attribute'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'描述',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_recipient',
- 'COLUMN', N'description'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_recipient',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_recipient',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'告警通知接收人',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_notify_recipient'
- GO
- -- sj_retry_dead_letter_0
- CREATE TABLE sj_retry_dead_letter_0
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- unique_id nvarchar(64) NOT NULL,
- group_name nvarchar(64) NOT NULL,
- scene_name nvarchar(64) NOT NULL,
- idempotent_id nvarchar(64) NOT NULL,
- biz_no nvarchar(64) NOT NULL DEFAULT '',
- executor_name nvarchar(512) NOT NULL DEFAULT '',
- args_str nvarchar(max) NOT NULL,
- ext_attrs nvarchar(max) NOT NULL,
- task_type tinyint NOT NULL DEFAULT 1,
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE UNIQUE INDEX uk_sj_retry_dead_letter_0_01 ON sj_retry_dead_letter_0 (namespace_id, group_name, unique_id)
- GO
- CREATE INDEX idx_sj_retry_dead_letter_0_01 ON sj_retry_dead_letter_0 (namespace_id, group_name, scene_name)
- GO
- CREATE INDEX idx_sj_retry_dead_letter_0_02 ON sj_retry_dead_letter_0 (idempotent_id)
- GO
- CREATE INDEX idx_sj_retry_dead_letter_0_03 ON sj_retry_dead_letter_0 (biz_no)
- GO
- CREATE INDEX idx_sj_retry_dead_letter_0_04 ON sj_retry_dead_letter_0 (create_dt)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_dead_letter_0',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_dead_letter_0',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'同组下id唯一',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_dead_letter_0',
- 'COLUMN', N'unique_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_dead_letter_0',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'场景名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_dead_letter_0',
- 'COLUMN', N'scene_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'幂等id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_dead_letter_0',
- 'COLUMN', N'idempotent_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'业务编号',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_dead_letter_0',
- 'COLUMN', N'biz_no'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行器名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_dead_letter_0',
- 'COLUMN', N'executor_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行方法参数',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_dead_letter_0',
- 'COLUMN', N'args_str'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'扩展字段',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_dead_letter_0',
- 'COLUMN', N'ext_attrs'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务类型 1、重试数据 2、回调数据',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_dead_letter_0',
- 'COLUMN', N'task_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_dead_letter_0',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'死信队列表',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_dead_letter_0'
- GO
- -- sj_retry_task_0
- CREATE TABLE sj_retry_task_0
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- unique_id nvarchar(64) NOT NULL,
- group_name nvarchar(64) NOT NULL,
- scene_name nvarchar(64) NOT NULL,
- idempotent_id nvarchar(64) NOT NULL,
- biz_no nvarchar(64) NOT NULL DEFAULT '',
- executor_name nvarchar(512) NOT NULL DEFAULT '',
- args_str nvarchar(max) NOT NULL,
- ext_attrs nvarchar(max) NOT NULL,
- next_trigger_at datetime2 NOT NULL,
- retry_count int NOT NULL DEFAULT 0,
- retry_status tinyint NOT NULL DEFAULT 0,
- task_type tinyint NOT NULL DEFAULT 1,
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE UNIQUE INDEX uk_sj_retry_task_0_01 ON sj_retry_task_0 (namespace_id, group_name, unique_id)
- GO
- CREATE INDEX idx_sj_retry_task_0_01 ON sj_retry_task_0 (namespace_id, group_name, scene_name)
- GO
- CREATE INDEX idx_sj_retry_task_0_02 ON sj_retry_task_0 (namespace_id, group_name, task_type)
- GO
- CREATE INDEX idx_sj_retry_task_0_03 ON sj_retry_task_0 (namespace_id, group_name, retry_status)
- GO
- CREATE INDEX idx_sj_retry_task_0_04 ON sj_retry_task_0 (idempotent_id)
- GO
- CREATE INDEX idx_sj_retry_task_0_05 ON sj_retry_task_0 (biz_no)
- GO
- CREATE INDEX idx_sj_retry_task_0_06 ON sj_retry_task_0 (create_dt)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'同组下id唯一',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'unique_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'场景名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'scene_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'幂等id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'idempotent_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'业务编号',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'biz_no'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行器名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'executor_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行方法参数',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'args_str'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'扩展字段',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'ext_attrs'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'下次触发时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'next_trigger_at'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'重试次数',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'retry_count'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'重试状态 0、重试中 1、成功 2、最大重试次数',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'retry_status'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务类型 1、重试数据 2、回调数据',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'task_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务表',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_0'
- GO
- -- sj_retry_task_log
- CREATE TABLE sj_retry_task_log
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- unique_id nvarchar(64) NOT NULL,
- group_name nvarchar(64) NOT NULL,
- scene_name nvarchar(64) NOT NULL,
- idempotent_id nvarchar(64) NOT NULL,
- biz_no nvarchar(64) NOT NULL DEFAULT '',
- executor_name nvarchar(512) NOT NULL DEFAULT '',
- args_str nvarchar(max) NOT NULL,
- ext_attrs nvarchar(max) NOT NULL,
- retry_status tinyint NOT NULL DEFAULT 0,
- task_type tinyint NOT NULL DEFAULT 1,
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE INDEX idx_sj_retry_task_log_01 ON sj_retry_task_log (namespace_id, group_name, scene_name)
- GO
- CREATE INDEX idx_sj_retry_task_log_02 ON sj_retry_task_log (retry_status)
- GO
- CREATE INDEX idx_sj_retry_task_log_03 ON sj_retry_task_log (idempotent_id)
- GO
- CREATE INDEX idx_sj_retry_task_log_04 ON sj_retry_task_log (unique_id)
- GO
- CREATE INDEX idx_sj_retry_task_log_05 ON sj_retry_task_log (biz_no)
- GO
- CREATE INDEX idx_sj_retry_task_log_06 ON sj_retry_task_log (create_dt)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'同组下id唯一',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log',
- 'COLUMN', N'unique_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'场景名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log',
- 'COLUMN', N'scene_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'幂等id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log',
- 'COLUMN', N'idempotent_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'业务编号',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log',
- 'COLUMN', N'biz_no'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行器名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log',
- 'COLUMN', N'executor_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行方法参数',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log',
- 'COLUMN', N'args_str'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'扩展字段',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log',
- 'COLUMN', N'ext_attrs'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'重试状态 0、重试中 1、成功 2、最大次数',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log',
- 'COLUMN', N'retry_status'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务类型 1、重试数据 2、回调数据',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log',
- 'COLUMN', N'task_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务日志基础信息表',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log'
- GO
- -- sj_retry_task_log_message
- CREATE TABLE sj_retry_task_log_message
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- group_name nvarchar(64) NOT NULL,
- unique_id nvarchar(64) NOT NULL,
- message nvarchar(max) NOT NULL,
- log_num int NOT NULL DEFAULT 1,
- real_time bigint NOT NULL DEFAULT 0,
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE INDEX idx_sj_retry_task_log_message_01 ON sj_retry_task_log_message (namespace_id, group_name, unique_id)
- GO
- CREATE INDEX idx_sj_retry_task_log_message_02 ON sj_retry_task_log_message (create_dt)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log_message',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log_message',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log_message',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'同组下id唯一',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log_message',
- 'COLUMN', N'unique_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'异常信息',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log_message',
- 'COLUMN', N'message'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'日志数量',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log_message',
- 'COLUMN', N'log_num'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'上报时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log_message',
- 'COLUMN', N'real_time'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log_message',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务调度日志信息记录表',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_task_log_message'
- GO
- -- sj_retry_scene_config
- CREATE TABLE sj_retry_scene_config
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- scene_name nvarchar(64) NOT NULL,
- group_name nvarchar(64) NOT NULL,
- scene_status tinyint NOT NULL DEFAULT 0,
- max_retry_count int NOT NULL DEFAULT 5,
- back_off tinyint NOT NULL DEFAULT 1,
- trigger_interval nvarchar(16) NOT NULL DEFAULT '',
- deadline_request bigint NOT NULL DEFAULT 60000,
- executor_timeout int NOT NULL DEFAULT 5,
- route_key tinyint NOT NULL DEFAULT 4,
- description nvarchar(256) NOT NULL DEFAULT '',
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE UNIQUE INDEX uk_sj_retry_scene_config_01 ON sj_retry_scene_config (namespace_id, group_name, scene_name)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_scene_config',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_scene_config',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'场景名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_scene_config',
- 'COLUMN', N'scene_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_scene_config',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组状态 0、未启用 1、启用',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_scene_config',
- 'COLUMN', N'scene_status'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'最大重试次数',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_scene_config',
- 'COLUMN', N'max_retry_count'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'1、默认等级 2、固定间隔时间 3、CRON 表达式',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_scene_config',
- 'COLUMN', N'back_off'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'间隔时长',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_scene_config',
- 'COLUMN', N'trigger_interval'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'Deadline Request 调用链超时 单位毫秒',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_scene_config',
- 'COLUMN', N'deadline_request'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务执行超时时间,单位秒',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_scene_config',
- 'COLUMN', N'executor_timeout'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'路由策略',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_scene_config',
- 'COLUMN', N'route_key'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'描述',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_scene_config',
- 'COLUMN', N'description'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_scene_config',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_scene_config',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'场景配置',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_scene_config'
- GO
- -- sj_server_node
- CREATE TABLE sj_server_node
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- group_name nvarchar(64) NOT NULL,
- host_id nvarchar(64) NOT NULL,
- host_ip nvarchar(64) NOT NULL,
- host_port int NOT NULL,
- expire_at datetime2 NOT NULL,
- node_type tinyint NOT NULL,
- ext_attrs nvarchar(256) NULL DEFAULT '',
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE UNIQUE INDEX uk_sj_server_node_01 ON sj_server_node (host_id, host_ip)
- GO
- CREATE INDEX idx_sj_server_node_01 ON sj_server_node (namespace_id, group_name)
- GO
- CREATE INDEX idx_sj_server_node_02 ON sj_server_node (expire_at, node_type)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_server_node',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_server_node',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_server_node',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主机id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_server_node',
- 'COLUMN', N'host_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'机器ip',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_server_node',
- 'COLUMN', N'host_ip'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'机器端口',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_server_node',
- 'COLUMN', N'host_port'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'过期时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_server_node',
- 'COLUMN', N'expire_at'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'节点类型 1、客户端 2、是服务端',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_server_node',
- 'COLUMN', N'node_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'扩展字段',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_server_node',
- 'COLUMN', N'ext_attrs'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_server_node',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_server_node',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'服务器节点',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_server_node'
- GO
- -- sj_distributed_lock
- CREATE TABLE sj_distributed_lock
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- name nvarchar(64) NOT NULL,
- lock_until datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- locked_at datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- locked_by nvarchar(255) NOT NULL,
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_distributed_lock',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'锁名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_distributed_lock',
- 'COLUMN', N'name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'锁定时长',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_distributed_lock',
- 'COLUMN', N'lock_until'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'锁定时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_distributed_lock',
- 'COLUMN', N'locked_at'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'锁定者',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_distributed_lock',
- 'COLUMN', N'locked_by'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_distributed_lock',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_distributed_lock',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'锁定表',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_distributed_lock'
- GO
- -- sj_system_user
- CREATE TABLE sj_system_user
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- username nvarchar(64) NOT NULL,
- password nvarchar(128) NOT NULL,
- role tinyint NOT NULL DEFAULT 0,
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_system_user',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'账号',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_system_user',
- 'COLUMN', N'username'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'密码',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_system_user',
- 'COLUMN', N'password'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'角色:1-普通用户、2-管理员',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_system_user',
- 'COLUMN', N'role'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_system_user',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_system_user',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'系统用户表',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_system_user'
- GO
- -- pwd: admin
- INSERT INTO sj_system_user(username, password, role, create_dt, update_dt) VALUES (N'admin', N'465c194afb65670f38322df087f0a9bb225cc257e43eb4ac5a0c98ef5b3173ac', N'2', getdate(), getdate())
- GO
- -- sj_system_user_permission
- CREATE TABLE sj_system_user_permission
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- group_name nvarchar(64) NOT NULL,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- system_user_id bigint NOT NULL,
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE UNIQUE INDEX uk_sj_system_user_permission_01 ON sj_system_user_permission (namespace_id, group_name, system_user_id)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_system_user_permission',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_system_user_permission',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_system_user_permission',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'系统用户id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_system_user_permission',
- 'COLUMN', N'system_user_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_system_user_permission',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_system_user_permission',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'系统用户权限表',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_system_user_permission'
- GO
- -- sj_sequence_alloc
- CREATE TABLE sj_sequence_alloc
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- group_name nvarchar(64) NOT NULL DEFAULT '',
- max_id bigint NOT NULL DEFAULT 1,
- step int NOT NULL DEFAULT 100,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE UNIQUE INDEX uk_sj_sequence_alloc_01 ON sj_sequence_alloc (namespace_id, group_name)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_sequence_alloc',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_sequence_alloc',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_sequence_alloc',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'最大id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_sequence_alloc',
- 'COLUMN', N'max_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'步长',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_sequence_alloc',
- 'COLUMN', N'step'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'更新时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_sequence_alloc',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'号段模式序号ID分配表',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_sequence_alloc'
- GO
- -- sj_job
- CREATE TABLE sj_job
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- group_name nvarchar(64) NOT NULL,
- job_name nvarchar(64) NOT NULL,
- args_str nvarchar(max) NULL DEFAULT NULL,
- args_type tinyint NOT NULL DEFAULT 1,
- next_trigger_at bigint NOT NULL,
- job_status tinyint NOT NULL DEFAULT 1,
- task_type tinyint NOT NULL DEFAULT 1,
- route_key tinyint NOT NULL DEFAULT 4,
- executor_type tinyint NOT NULL DEFAULT 1,
- executor_info nvarchar(255) NULL DEFAULT NULL,
- trigger_type tinyint NOT NULL,
- trigger_interval nvarchar(255) NOT NULL,
- block_strategy tinyint NOT NULL DEFAULT 1,
- executor_timeout int NOT NULL DEFAULT 0,
- max_retry_times int NOT NULL DEFAULT 0,
- parallel_num int NOT NULL DEFAULT 1,
- retry_interval int NOT NULL DEFAULT 0,
- bucket_index int NOT NULL DEFAULT 0,
- resident tinyint NOT NULL DEFAULT 0,
- description nvarchar(256) NOT NULL DEFAULT '',
- ext_attrs nvarchar(256) NULL DEFAULT '',
- deleted tinyint NOT NULL DEFAULT 0,
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE INDEX idx_sj_job_01 ON sj_job (namespace_id, group_name)
- GO
- CREATE INDEX idx_sj_job_02 ON sj_job (job_status, bucket_index)
- GO
- CREATE INDEX idx_sj_job_03 ON sj_job (create_dt)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'job_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行方法参数',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'args_str'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'参数类型 ',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'args_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'下次触发时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'next_trigger_at'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务状态 0、关闭、1、开启',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'job_status'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务类型 1、集群 2、广播 3、切片',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'task_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'路由策略',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'route_key'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行器类型',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'executor_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行器名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'executor_info'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'触发类型 1.CRON 表达式 2. 固定时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'trigger_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'间隔时长',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'trigger_interval'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'阻塞策略 1、丢弃 2、覆盖 3、并行',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'block_strategy'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务执行超时时间,单位秒',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'executor_timeout'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'最大重试次数',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'max_retry_times'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'并行数',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'parallel_num'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'重试间隔 ( s ) ',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'retry_interval'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'bucket',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'bucket_index'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'是否是常驻任务',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'resident'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'描述',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'description'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'扩展字段',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'ext_attrs'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'逻辑删除 1、删除',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'deleted'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务信息',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job'
- GO
- INSERT INTO sj_job (namespace_id, group_name, job_name, args_str, args_type, next_trigger_at, job_status, task_type, route_key, executor_type, executor_info, trigger_type, trigger_interval, block_strategy,executor_timeout, max_retry_times, parallel_num, retry_interval, bucket_index, resident, description, ext_attrs, deleted, create_dt, update_dt) VALUES (N'dev', N'ruoyi_group', N'demo-job', null, 1, 1710344035622, 1, 1, 4, 1, N'testJobExecutor', 2, N'60', 1, 60, 3, 1, 1, 116, 0, N'', N'', 0, getdate(), getdate())
- GO
- -- sj_job_log_message
- CREATE TABLE sj_job_log_message
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- group_name nvarchar(64) NOT NULL,
- job_id bigint NOT NULL,
- task_batch_id bigint NOT NULL,
- task_id bigint NOT NULL,
- message nvarchar(max) NOT NULL,
- log_num int NOT NULL DEFAULT 1,
- real_time bigint NOT NULL DEFAULT 0,
- ext_attrs nvarchar(256) NULL DEFAULT '',
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE INDEX idx_sj_job_log_message_01 ON sj_job_log_message (task_batch_id, task_id)
- GO
- CREATE INDEX idx_sj_job_log_message_02 ON sj_job_log_message (create_dt)
- GO
- CREATE INDEX idx_sj_job_log_message_03 ON sj_job_log_message (namespace_id, group_name)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_log_message',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_log_message',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_log_message',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务信息id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_log_message',
- 'COLUMN', N'job_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务批次id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_log_message',
- 'COLUMN', N'task_batch_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'调度任务id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_log_message',
- 'COLUMN', N'task_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'调度信息',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_log_message',
- 'COLUMN', N'message'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'日志数量',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_log_message',
- 'COLUMN', N'log_num'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'上报时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_log_message',
- 'COLUMN', N'real_time'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'扩展字段',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_log_message',
- 'COLUMN', N'ext_attrs'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_log_message',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'调度日志',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_log_message'
- GO
- -- sj_job_task
- CREATE TABLE sj_job_task
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- group_name nvarchar(64) NOT NULL,
- job_id bigint NOT NULL,
- task_batch_id bigint NOT NULL,
- parent_id bigint NOT NULL DEFAULT 0,
- task_status tinyint NOT NULL DEFAULT 0,
- retry_count int NOT NULL DEFAULT 0,
- client_info nvarchar(128) NULL DEFAULT NULL,
- result_message nvarchar(max) NOT NULL,
- args_str nvarchar(max) NULL DEFAULT NULL,
- args_type tinyint NOT NULL DEFAULT 1,
- ext_attrs nvarchar(256) NULL DEFAULT '',
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE INDEX idx_sj_job_task_01 ON sj_job_task (task_batch_id, task_status)
- GO
- CREATE INDEX idx_sj_job_task_02 ON sj_job_task (create_dt)
- GO
- CREATE INDEX idx_sj_job_task_03 ON sj_job_task (namespace_id, group_name)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务信息id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task',
- 'COLUMN', N'job_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'调度任务id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task',
- 'COLUMN', N'task_batch_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'父执行器id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task',
- 'COLUMN', N'parent_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行的状态 0、失败 1、成功',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task',
- 'COLUMN', N'task_status'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'重试次数',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task',
- 'COLUMN', N'retry_count'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'客户端地址 clientId#ip:port',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task',
- 'COLUMN', N'client_info'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行结果',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task',
- 'COLUMN', N'result_message'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行方法参数',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task',
- 'COLUMN', N'args_str'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'参数类型 ',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task',
- 'COLUMN', N'args_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'扩展字段',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task',
- 'COLUMN', N'ext_attrs'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务实例',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task'
- GO
- -- sj_job_task_batch
- CREATE TABLE sj_job_task_batch
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- group_name nvarchar(64) NOT NULL,
- job_id bigint NOT NULL,
- workflow_node_id bigint NOT NULL DEFAULT 0,
- parent_workflow_node_id bigint NOT NULL DEFAULT 0,
- workflow_task_batch_id bigint NOT NULL DEFAULT 0,
- task_batch_status tinyint NOT NULL DEFAULT 0,
- operation_reason tinyint NOT NULL DEFAULT 0,
- execution_at bigint NOT NULL DEFAULT 0,
- system_task_type tinyint NOT NULL DEFAULT 3,
- parent_id nvarchar(64) NOT NULL DEFAULT '',
- ext_attrs nvarchar(256) NULL DEFAULT '',
- deleted tinyint NOT NULL DEFAULT 0,
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE INDEX idx_sj_job_task_batch_01 ON sj_job_task_batch (job_id, task_batch_status)
- GO
- CREATE INDEX idx_sj_job_task_batch_02 ON sj_job_task_batch (create_dt)
- GO
- CREATE INDEX idx_sj_job_task_batch_03 ON sj_job_task_batch (namespace_id, group_name)
- GO
- CREATE INDEX idx_sj_job_task_batch_04 ON sj_job_task_batch (workflow_task_batch_id, workflow_node_id)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'job_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'工作流节点id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'workflow_node_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'工作流任务父批次id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'parent_workflow_node_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'工作流任务批次id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'workflow_task_batch_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务批次状态 0、失败 1、成功',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'task_batch_status'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'操作原因',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'operation_reason'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务执行时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'execution_at'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务类型 3、JOB任务 4、WORKFLOW任务',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'system_task_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'父节点',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'parent_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'扩展字段',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'ext_attrs'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'逻辑删除 1、删除',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'deleted'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务批次',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_task_batch'
- GO
- -- sj_job_summary
- CREATE TABLE sj_job_summary
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- group_name nvarchar(64) NOT NULL DEFAULT '',
- business_id bigint NOT NULL,
- system_task_type tinyint NOT NULL DEFAULT 3,
- trigger_at datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- success_num int NOT NULL DEFAULT 0,
- fail_num int NOT NULL DEFAULT 0,
- fail_reason nvarchar(512) NOT NULL DEFAULT '',
- stop_num int NOT NULL DEFAULT 0,
- stop_reason nvarchar(512) NOT NULL DEFAULT '',
- cancel_num int NOT NULL DEFAULT 0,
- cancel_reason nvarchar(512) NOT NULL DEFAULT '',
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE UNIQUE INDEX uk_sj_job_summary_01 ON sj_job_summary (trigger_at, system_task_type, business_id)
- GO
- CREATE INDEX idx_sj_job_summary_01 ON sj_job_summary (namespace_id, group_name, business_id)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'业务id ( job_id或workflow_id ) ',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary',
- 'COLUMN', N'business_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务类型 3、JOB任务 4、WORKFLOW任务',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary',
- 'COLUMN', N'system_task_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'统计时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary',
- 'COLUMN', N'trigger_at'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行成功-日志数量',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary',
- 'COLUMN', N'success_num'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行失败-日志数量',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary',
- 'COLUMN', N'fail_num'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'失败原因',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary',
- 'COLUMN', N'fail_reason'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行失败-日志数量',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary',
- 'COLUMN', N'stop_num'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'失败原因',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary',
- 'COLUMN', N'stop_reason'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'执行失败-日志数量',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary',
- 'COLUMN', N'cancel_num'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'失败原因',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary',
- 'COLUMN', N'cancel_reason'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'DashBoard_Job',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_job_summary'
- GO
- -- sj_retry_summary
- CREATE TABLE sj_retry_summary
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- group_name nvarchar(64) NOT NULL DEFAULT '',
- scene_name nvarchar(50) NOT NULL DEFAULT '',
- trigger_at datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- running_num int NOT NULL DEFAULT 0,
- finish_num int NOT NULL DEFAULT 0,
- max_count_num int NOT NULL DEFAULT 0,
- suspend_num int NOT NULL DEFAULT 0,
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE UNIQUE INDEX uk_sj_retry_summary_01 ON sj_retry_summary (namespace_id, group_name, scene_name, trigger_at)
- GO
- CREATE INDEX idx_sj_retry_summary_01 ON sj_retry_summary (trigger_at)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_summary',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_summary',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_summary',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'场景名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_summary',
- 'COLUMN', N'scene_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'统计时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_summary',
- 'COLUMN', N'trigger_at'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'重试中-日志数量',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_summary',
- 'COLUMN', N'running_num'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'重试完成-日志数量',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_summary',
- 'COLUMN', N'finish_num'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'重试到达最大次数-日志数量',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_summary',
- 'COLUMN', N'max_count_num'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'暂停重试-日志数量',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_summary',
- 'COLUMN', N'suspend_num'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_summary',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_summary',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'DashBoard_Retry',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_retry_summary'
- GO
- -- sj_workflow
- CREATE TABLE sj_workflow
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- workflow_name nvarchar(64) NOT NULL,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- group_name nvarchar(64) NOT NULL,
- workflow_status tinyint NOT NULL DEFAULT 1,
- trigger_type tinyint NOT NULL,
- trigger_interval nvarchar(255) NOT NULL,
- next_trigger_at bigint NOT NULL,
- block_strategy tinyint NOT NULL DEFAULT 1,
- executor_timeout int NOT NULL DEFAULT 0,
- description nvarchar(256) NOT NULL DEFAULT '',
- flow_info nvarchar(max) NULL DEFAULT NULL,
- bucket_index int NOT NULL DEFAULT 0,
- version int NOT NULL,
- ext_attrs nvarchar(256) NULL DEFAULT '',
- deleted tinyint NOT NULL DEFAULT 0,
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE INDEX idx_sj_workflow_01 ON sj_workflow (create_dt)
- GO
- CREATE INDEX idx_sj_workflow_02 ON sj_workflow (namespace_id, group_name)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'工作流名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'workflow_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'工作流状态 0、关闭、1、开启',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'workflow_status'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'触发类型 1.CRON 表达式 2. 固定时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'trigger_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'间隔时长',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'trigger_interval'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'下次触发时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'next_trigger_at'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'阻塞策略 1、丢弃 2、覆盖 3、并行',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'block_strategy'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务执行超时时间,单位秒',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'executor_timeout'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'描述',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'description'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'流程信息',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'flow_info'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'bucket',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'bucket_index'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'版本号',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'version'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'扩展字段',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'ext_attrs'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'逻辑删除 1、删除',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'deleted'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'工作流',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow'
- GO
- -- sj_workflow_node
- CREATE TABLE sj_workflow_node
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- node_name nvarchar(64) NOT NULL,
- group_name nvarchar(64) NOT NULL,
- job_id bigint NOT NULL,
- workflow_id bigint NOT NULL,
- node_type tinyint NOT NULL DEFAULT 1,
- expression_type tinyint NOT NULL DEFAULT 0,
- fail_strategy tinyint NOT NULL DEFAULT 1,
- workflow_node_status tinyint NOT NULL DEFAULT 1,
- priority_level int NOT NULL DEFAULT 1,
- node_info nvarchar(max) NULL DEFAULT NULL,
- version int NOT NULL,
- ext_attrs nvarchar(256) NULL DEFAULT '',
- deleted tinyint NOT NULL DEFAULT 0,
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE INDEX idx_sj_workflow_node_01 ON sj_workflow_node (create_dt)
- GO
- CREATE INDEX idx_sj_workflow_node_02 ON sj_workflow_node (namespace_id, group_name)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'节点名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'node_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务信息id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'job_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'工作流ID',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'workflow_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'1、任务节点 2、条件节点',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'node_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'1、SpEl、2、Aviator 3、QL',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'expression_type'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'失败策略 1、跳过 2、阻塞',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'fail_strategy'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'工作流节点状态 0、关闭、1、开启',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'workflow_node_status'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'优先级',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'priority_level'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'节点信息 ',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'node_info'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'版本号',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'version'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'扩展字段',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'ext_attrs'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'逻辑删除 1、删除',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'deleted'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'工作流节点',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_node'
- GO
- -- sj_workflow_task_batch
- CREATE TABLE sj_workflow_task_batch
- (
- id bigint NOT NULL PRIMARY KEY IDENTITY,
- namespace_id nvarchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
- group_name nvarchar(64) NOT NULL,
- workflow_id bigint NOT NULL,
- task_batch_status tinyint NOT NULL DEFAULT 0,
- operation_reason tinyint NOT NULL DEFAULT 0,
- flow_info nvarchar(max) NULL DEFAULT NULL,
- execution_at bigint NOT NULL DEFAULT 0,
- ext_attrs nvarchar(256) NULL DEFAULT '',
- deleted tinyint NOT NULL DEFAULT 0,
- create_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP,
- update_dt datetime2 NOT NULL DEFAULT CURRENT_TIMESTAMP
- )
- GO
- CREATE INDEX idx_sj_workflow_task_batch_01 ON sj_workflow_task_batch (workflow_id, task_batch_status)
- GO
- CREATE INDEX idx_sj_workflow_task_batch_02 ON sj_workflow_task_batch (create_dt)
- GO
- CREATE INDEX idx_sj_workflow_task_batch_03 ON sj_workflow_task_batch (namespace_id, group_name)
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'主键',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_task_batch',
- 'COLUMN', N'id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'命名空间id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_task_batch',
- 'COLUMN', N'namespace_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'组名称',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_task_batch',
- 'COLUMN', N'group_name'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'工作流任务id',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_task_batch',
- 'COLUMN', N'workflow_id'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务批次状态 0、失败 1、成功',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_task_batch',
- 'COLUMN', N'task_batch_status'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'操作原因',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_task_batch',
- 'COLUMN', N'operation_reason'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'流程信息',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_task_batch',
- 'COLUMN', N'flow_info'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'任务执行时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_task_batch',
- 'COLUMN', N'execution_at'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'扩展字段',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_task_batch',
- 'COLUMN', N'ext_attrs'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'逻辑删除 1、删除',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_task_batch',
- 'COLUMN', N'deleted'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'创建时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_task_batch',
- 'COLUMN', N'create_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'修改时间',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_task_batch',
- 'COLUMN', N'update_dt'
- GO
- EXEC sp_addextendedproperty
- 'MS_Description', N'工作流批次',
- 'SCHEMA', N'dbo',
- 'TABLE', N'sj_workflow_task_batch'
- GO
|