Initial commit

This commit is contained in:
Alessio
2024-11-17 19:37:57 -08:00
commit 4af0e05c8d
10 changed files with 279 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
create table stuff (
rowid integer primary key,
data text not null,
amount integer not null
) strict;
create table stuff2 (
weird_pk integer primary key,
label text not null unique,
stuff_id integer references stuff(rowid),
alternative_stuff_id integer references stuff(amount)
) strict;

View File

@@ -0,0 +1,13 @@
create table stuff (
rowid integer primary key,
data text not null,
amount integer not null
) strict;
create index index_stuff_amount on stuff (amount);
create table stuff2 (
weird_pk integer primary key,
label text not null unique,
stuff_id int references stuff(rowid),
alternative_stuff_id integer references stuff(amount)
) strict;

View File

@@ -0,0 +1,13 @@
create table stuff (
rowid integer primary key,
data text not null,
amount integer
) strict;
create index index_stuff_amount on stuff (amount);
create table stuff2 (
weird_pk integer primary key,
label text not null unique,
stuff_id integer references stuff(rowid),
alternative_stuff_id integer references stuff(amount)
) strict;

View File

@@ -0,0 +1,13 @@
create table stuff (
rowid integer primary key,
data text not null,
amount integer not null
) strict;
create index index_stuff_amount on stuff (amount);
create table stuff2 (
weird_pk integer primary key,
label text not null unique,
stuff_id integer references stuff(rowid),
alternative_stuff_id integer references stuff(amount)
);

13
test_schemas/success.sql Normal file
View File

@@ -0,0 +1,13 @@
create table stuff (
rowid integer primary key,
data text not null,
amount integer not null
) strict;
create index index_stuff_amount on stuff (amount);
create table stuff2 (
weird_pk integer primary key,
label text not null unique,
stuff_id integer references stuff(rowid),
alternative_stuff_id integer references stuff(amount)
) strict;

View File

@@ -0,0 +1,28 @@
PRAGMA foreign_keys = on;
create table implicit_rowid (
a integer
);
create table explicit_rowid_not_pk (
rowid integer
);
create table explicit_rowid (
rowid integer primary key
);
create table without_rowid (
a integer primary key
) without rowid;
create table multi_column (
a int,
b integer,
primary key(a, b)
);
create table foreign_key_missing_index (
a references implicit_rowid(a)
);