createEdgesTable constant

String const createEdgesTable

Implementation

static const String createEdgesTable = '''
  CREATE TABLE edges (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    from_vertex_id INTEGER NOT NULL,
    to_vertex_id INTEGER NOT NULL,
    archived BOOLEAN DEFAULT FALSE,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY (from_vertex_id) REFERENCES vertices(id) ON DELETE CASCADE,
    FOREIGN KEY (to_vertex_id) REFERENCES vertices(id) ON DELETE CASCADE
  )
''';