Skip to content

Instantly share code, notes, and snippets.

@amrfarid140
Created July 11, 2018 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amrfarid140/81b60f2b37505118830fead0ee12ae89 to your computer and use it in GitHub Desktop.
Save amrfarid140/81b60f2b37505118830fead0ee12ae89 to your computer and use it in GitHub Desktop.
Database schema definition
import Dexie from "dexie";
import { IRepositroy } from "./models/Repository";
export class AppDatabase extends Dexie {
public repos: Dexie.Table<IRepositroy, number>;
constructor() {
super("sample-database");
this.version(1).stores({
repos: "++id,name,html_url,description"
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment