File: setup.sql

package info (click to toggle)
rust-sqlx 0.8.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,744 kB
  • sloc: sql: 335; python: 268; sh: 71; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 383 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
IF DB_ID('sqlx') IS NULL
    BEGIN
        CREATE DATABASE sqlx;
    END;
GO

USE sqlx;
GO

IF OBJECT_ID('tweet') IS NULL
    BEGIN
        CREATE TABLE tweet
        (
            id       BIGINT          NOT NULL PRIMARY KEY,
            text     NVARCHAR(4000)  NOT NULL,
            is_sent  TINYINT         NOT NULL DEFAULT 1,
            owner_id BIGINT
        );
    END;
GO