An open API service indexing awesome lists of open source software.

https://github.com/toshimaru/rdm-rails5.1


https://github.com/toshimaru/rdm-rails5.1

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# README [![CircleCI](https://circleci.com/gh/toshimaru/rdm-rails5.1.svg?style=svg)](https://circleci.com/gh/toshimaru/rdm-rails5.1)

## Create User CSV Data

```
$ bundle exec rails create_big_user_csv_data
```

## Load CSV Data

```
mysql -u root --local-infile -e "LOAD DATA LOCAL INFILE './db/user_seed.csv' INTO TABLE rdm_development.users FIELDS TERMINATED BY ',' (email, name, point, created_at, updated_at)"
mysql -u root --local-infile -e "LOAD DATA LOCAL INFILE './db/post_seed.csv' INTO TABLE rdm_development.posts FIELDS TERMINATED BY ',' (user_id, title, content, like_count, created_at, updated_at)"
```

## Reset User DATA

```
$ bundle exec rails db:migrate:reset
```