MCPcopy Create free account
hub / github.com/vastsa/FileCodeBox / create_key_value_table

Function create_key_value_table

apps/base/migrations/migrations_001.py:31–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29
30
31async def create_key_value_table():
32 conn = connections.get("default")
33 await conn.execute_script(
34 """
35 CREATE TABLE IF NOT EXISTS keyvalue
36 (
37 id INTEGER not null
38 primary key autoincrement,
39 key VARCHAR(255) not null
40 unique,
41 value JSON,
42 created_at TIMESTAMP default CURRENT_TIMESTAMP not null
43 );
44 CREATE INDEX IF NOT EXISTS idx_keyvalue_key_eab890
45 on keyvalue (key);
46 """
47 )
48
49
50async def migrate():

Callers 1

migrateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected