decred.org/dcrdex@v1.0.5/server/db/driver/pg/internal/meta.go (about)

     1  package internal
     2  
     3  const (
     4  	// CreateMetaTable creates a table to hold DEX metadata. This query has a %s
     5  	// specifier for "meta" / metaTableName so it can work with createTable.
     6  	CreateMetaTable = `CREATE TABLE IF NOT EXISTS %s (
     7  		schema_version INT4 DEFAULT 0
     8  	);`
     9  
    10  	// CreateMetaRow creates the single row of the meta table.
    11  	CreateMetaRow = "INSERT INTO meta DEFAULT VALUES;"
    12  
    13  	SelectDBVersion = `SELECT schema_version FROM meta;`
    14  
    15  	SetDBVersion = `UPDATE meta SET schema_version = $1;`
    16  )