Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE IF NOT EXISTS Categorias(
- CategoriaId INTEGER PRIMARY KEY NOT NULL,
- CategoriaSuperior INTEGER,
- Nombre TEXT NOT NULL,
- FOREIGN KEY(CategoriaSuperior) REFERENCES Categorias(CategoriaId))
- CREATE TABLE IF NOT EXISTS Archivos(
- ArchivoId INTEGER PRIMARY KEY NOT NULL,
- NombreArchivo TEXT NOT NULL, Checksum TEXT NOT NULL,
- CategoriaId INTEGER, Extension TEXT NOT NULL,
- FechaCreacion TEXT NOT NULL,
- FechaModificacion TEXT NOT NULL,
- Thumbnail BLOB)
- CREATE TABLE IF NOT EXISTS Etiquetas (
- EtiquetasId INTEGER PRIMARY KEY NOT NULL,
- Nombre TEXT NOT NULL,
- Color TEXT NOT NULL)
- CREATE TABLE IF NOT EXISTS ArchivoEtiquetas(
- ArchivoId INTEGER NOT NULL,
- CategoriaId INTEGER NOT NULL,
- PRIMARY KEY(ArchivoId, CategoriaId),
- FOREIGN KEY(ArchivoId) REFERENCES Archivos(ArchivoId),
- FOREIGN KEY(CategoriaId) REFERENCES Categorias(CategoriaId))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement