Skip to content

Instantly share code, notes, and snippets.

@yelluw
Last active July 24, 2017 18:56
Show Gist options
  • Save yelluw/d44bd2456c75c931051402414bfd20fb to your computer and use it in GitHub Desktop.
Save yelluw/d44bd2456c75c931051402414bfd20fb to your computer and use it in GitHub Desktop.
Nikeza SQL Schema

Related to Nikeza issue #77

Schema

Tables

Authentication

  • Users

Admin - All of us Producers - Users who have feature their content on nikeza Consumers - Users who only consume content on Nikeza

- id
- email_address
- username
- password 
- first_name
- last_name
- user_type (admin, producer, consumer)
CREATE TABLE Users IF NOT EXISTS {
  id INT AUTOINCREMENT;
  email_address TEXT;
  username TEXT;
  password TEXT;
  first_name TEXT;
  last_name TEXT;
  user_type TEXT;
}


- Content

This table represents every piece of content in Nikeza

  • id
  • url
  • owner or user_id (Users.id)
  • date added
  • slug (title)

- User Platform Id

This table relates a nikeza user with their nicknames in other platforms.

  • id
  • owner or user_id User.id
  • plaform_id Platforms.id

- Platforms

This table represents platforms nikeza integrates with

  • id
  • owner or user_id User.id
  • name (Wordpress, Youtube, etc)





#### Tables previously thought of on issue

(Added for Reference)

Followers Subscriptions ContentProviders Sources Topics Link ContentProviderLinks LinkTopics Platforms ContentProviderPlatforms Profile

@bizmonger
Copy link

Need to add "Featured" for Topic and Link tables.
user_type (admin, provider, employer)****

Need to append a timestamp column to every dynamic table.

Need an alias table for username

Need emailaddress for users table

@yelluw
Copy link
Author

yelluw commented Jul 24, 2017

Yes, email address was missing. Added it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment