repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/seed.rb | db/fixtures/seed.rb | require './lib/seeds/path_builder'
# load paths
load './db/fixtures/paths/foundations/seed.rb'
load './db/fixtures/paths/full_stack_rails/seed.rb'
load './db/fixtures/paths/full_stack_javascript/seed.rb'
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/lessons/foundation_lessons.rb | db/fixtures/lessons/foundation_lessons.rb | def foundation_lessons
{
'How This Course Will Work' => {
title: 'How This Course Will Work',
description: 'Before you dive in, get familiar with the lay of the land up ahead.',
is_project: false,
github_path: '/foundations/introduction/how_this_course_will_work.md',
identifier_uuid:... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/lessons/ruby_lessons.rb | db/fixtures/lessons/ruby_lessons.rb | def ruby_lessons
{
'How This Course Will Work' => {
title: 'How This Course Will Work',
description: "It's time to get acquainted with what this will look like from here on out.",
is_project: false,
github_path: '/ruby/introduction/how_this_course_will_work.md',
identifier_uuid: '364... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/lessons/node_js_lessons.rb | db/fixtures/lessons/node_js_lessons.rb | def node_js_lessons
{
'Introduction: What is NodeJS?' => {
title: 'Introduction: What is NodeJS?',
description: 'Lets take a look at what Node is, and what it means to write code for a server.',
is_project: false,
github_path: '/nodeJS/introduction_to_nodeJS/introduction_what_is_nodeJS.md'... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/lessons/shared_lessons.rb | db/fixtures/lessons/shared_lessons.rb | def shared_lessons
{
'Introduction to the Back End' => {
title: 'Introduction to the Back End',
description: 'A brief introduction to the wonderful world of server-side programming',
is_project: false,
github_path: '/shared/the_back_end/introduction_to_the_backend_lesson.md',
identif... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/lessons/git_lessons.rb | db/fixtures/lessons/git_lessons.rb | def git_lessons
{
'Introduction to Git' => {
title: 'Introduction to Git',
description: "A high level overview of what Git is and why it's so useful",
is_project: false,
github_path: '/git/foundations_git/introduction_to_git.md',
identifier_uuid: '12ba3e27-8391-4f98-917a-b34b7babc23b... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/lessons/getting_hired_lessons.rb | db/fixtures/lessons/getting_hired_lessons.rb | def getting_hired_lessons
{
'How This Course Will Work' => {
title: 'How This Course Will Work',
description: "This course is a bit different than the others so it's worth getting acquainted with how it will work.",
is_project: false,
github_path: '/getting_hired/preparing_for_job_search/h... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/lessons/database_lessons.rb | db/fixtures/lessons/database_lessons.rb | def database_lessons
{
'Databases' => {
title: 'Databases',
description: "Here you'll learn the basics of databases and how they store data.",
is_project: false,
github_path: '/databases/databases/databases.md',
identifier_uuid: '567f9db4-655c-4df9-9de2-71fc8cfbf391',
},
'Dat... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/lessons/react_lessons.rb | db/fixtures/lessons/react_lessons.rb | def react_lessons
{
'How This Course Will Work' => {
title: 'How This Course Will Work',
description: 'How This Course Will Work',
is_project: false,
github_path: '/react/introduction/how_this_course_will_work.md',
identifier_uuid: 'e3c57baf-7c1e-4449-8cda-d6d9518f2f16',
},
'... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/lessons/javascript_lessons.rb | db/fixtures/lessons/javascript_lessons.rb | def javascript_lessons
{
'How This Course Will Work' => {
title: 'How This Course Will Work',
description: 'How this course will work',
is_project: false,
github_path: '/javascript/introduction/how_this_course_will_work.md',
identifier_uuid: '93d2a049-0f6c-4da8-b346-d477c1e7a000',
... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/lessons/html_and_css_lessons.rb | db/fixtures/lessons/html_and_css_lessons.rb | def html_and_css_lessons
{
# Accessibility section
'Introduction to Web Accessibility' => {
title: 'Introduction to Web Accessibility',
description: 'Learn what accessibility means to you as a web developer',
is_project: false,
github_path: '/advanced_html_css/accessibility/introductio... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/lessons/ruby_on_rails_lessons.rb | db/fixtures/lessons/ruby_on_rails_lessons.rb | def ruby_on_rails_lessons
{
'How This Course Will Work' => {
title: 'How This Course Will Work',
description: "Let's get acquainted with what this will look like from here on out.",
is_project: false,
github_path: '/ruby_on_rails/introduction/how_this_course_will_work.md',
identifier... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/foundations/seed.rb | db/fixtures/paths/foundations/seed.rb | # ************************
# Path - Foundations
# ************************
path = Seeds::PathBuilder.build do |path|
path.title = 'Foundations'
path.short_title = 'Foundations Path'
path.description = "This is where it all begins! A hands-on introduction to all of the essential tools you'll need to build real, wo... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_rails/seed.rb | db/fixtures/paths/full_stack_rails/seed.rb | # ***************************
# Path - Full Stack Rails
# ***************************
@path = Seeds::PathBuilder.build do |path|
path.title = 'Full Stack Ruby on Rails'
path.short_title = 'Rails Path'
path.description = "This path takes you through our entire Ruby on Rails curriculum. The courses should be taken ... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_rails/courses/advanced_html_css.rb | db/fixtures/paths/full_stack_rails/courses/advanced_html_css.rb | ########################
# Course - HTML and CSS
########################
course = @path.add_course do |course|
course.title = 'Advanced HTML and CSS'
course.description = "It's time to dig in and become the CSS expert you deserve to be. After this course you'll be equipped to create web projects that look beautifu... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_rails/courses/rails.rb | db/fixtures/paths/full_stack_rails/courses/rails.rb | ########################
# Course - Ruby on Rails
########################
course = @path.add_course do |course|
course.title = 'Ruby on Rails'
course.description = "Take Ruby to the next level with the Ruby on Rails framework! Learn how to fully craft your site's backend using the Model-View-Controller design patt... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_rails/courses/intermediate_html_css.rb | db/fixtures/paths/full_stack_rails/courses/intermediate_html_css.rb | ########################
# Course - HTML and CSS
########################
course = @path.add_course do |course|
course.title = 'Intermediate HTML and CSS'
course.description = "Let's learn a little more about what you can do with HTML and CSS."
course.identifier_uuid = '6dee731e-4ef7-4986-9411-63ed9b2de9d9'
cou... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_rails/courses/databases.rb | db/fixtures/paths/full_stack_rails/courses/databases.rb | #######################
# Course - Databases
#######################
course = @path.add_course do |course|
course.title = 'Databases'
course.description = 'Databases are used to organize and capture large amounts of data, typically by inputting, storing, retrieving and managing the information. This course will foc... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_rails/courses/getting_hired.rb | db/fixtures/paths/full_stack_rails/courses/getting_hired.rb | ########################
# Course - Getting Hired
########################
course = @path.add_course do |course|
course.title = 'Getting Hired'
course.description = "Web development is a lifelong journey of learning and growth. Continue that journey on a professional development team! You'll learn where to find jo... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_rails/courses/react.rb | db/fixtures/paths/full_stack_rails/courses/react.rb | ########################
# Course - React
########################
course = @path.add_course do |course|
course.title = 'React'
course.description = 'Let\'s learn React, the most popular JavaScript library for building user interfaces. Take your frontend skills to a whole new level!'
course.identifier_uuid = '86f... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_rails/courses/javascript.rb | db/fixtures/paths/full_stack_rails/courses/javascript.rb | ########################
# Course - JavaScript
########################
course = @path.add_course do |course|
course.title = 'JavaScript'
course.description = "Make your websites dynamic and interactive with JavaScript! You'll create features and stand-alone applications. This module includes projects where you wil... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_rails/courses/ruby.rb | db/fixtures/paths/full_stack_rails/courses/ruby.rb | #######################
# Course - Ruby
#######################
course = @path.add_course do |course|
course.title = 'Ruby'
course.description = "Time to dive deep into Ruby, the language 'designed for programmer happiness.' You'll cover object-oriented design, testing, and data structures – essential knowledge for... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_javascript/seed.rb | db/fixtures/paths/full_stack_javascript/seed.rb | # *****************************
# Path - Full Stack JavaScript
# *****************************
@path = Seeds::PathBuilder.build do |path|
path.title = 'Full Stack JavaScript'
path.short_title = 'Node Path'
path.description = "This path takes you through our entire JavaScript curriculum. The courses should be take... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_javascript/courses/advanced_html_css.rb | db/fixtures/paths/full_stack_javascript/courses/advanced_html_css.rb | ########################
# Course - HTML and CSS
########################
course = @path.add_course do |course|
course.title = 'Advanced HTML and CSS'
course.description = "It's time to dig in and become the CSS expert you deserve to be. After this course you'll be equipped to create web projects that look beautifu... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_javascript/courses/intermediate_html_css.rb | db/fixtures/paths/full_stack_javascript/courses/intermediate_html_css.rb | ########################
# Course - HTML and CSS
########################
course = @path.add_course do |course|
course.title = 'Intermediate HTML and CSS'
course.description = "Let's learn a little more about what you can do with HTML and CSS."
course.identifier_uuid = '866f2d6b-30ec-461c-9c0d-dc9f3d6ce71f'
cou... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_javascript/courses/databases.rb | db/fixtures/paths/full_stack_javascript/courses/databases.rb | #######################
# Course - Databases
#######################
course = @path.add_course do |course|
course.title = 'Databases'
course.description = 'Databases are used to organize and capture large amounts of data, typically by inputting, storing, retrieving and managing the information. This course will foc... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_javascript/courses/getting_hired.rb | db/fixtures/paths/full_stack_javascript/courses/getting_hired.rb | ########################
# Course - Getting Hired
########################
course = @path.add_course do |course|
course.title = 'Getting Hired'
course.description = "Web development is a lifelong journey of learning and growth. Continue that journey on a professional development team! You'll learn where to find jo... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_javascript/courses/node_js.rb | db/fixtures/paths/full_stack_javascript/courses/node_js.rb | #######################
# Course - NodeJS
#######################
course = @path.add_course do |course|
course.title = 'NodeJS'
course.description = "Take your JavaScript skills to the server-side! Learn how to fully craft your site's backend using Express, the most popular back-end JavaScript framework! You will a... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_javascript/courses/react.rb | db/fixtures/paths/full_stack_javascript/courses/react.rb | ########################
# Course - React
########################
course = @path.add_course do |course|
course.title = 'React'
course.description = 'Let\'s learn React, the most popular JavaScript library for building user interfaces. Take your frontend skills to a whole new level!'
course.identifier_uuid = 'f1d... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/fixtures/paths/full_stack_javascript/courses/javascript.rb | db/fixtures/paths/full_stack_javascript/courses/javascript.rb | ########################
# Course - JavaScript
########################
course = @path.add_course do |course|
course.title = 'JavaScript'
course.description = "Make your websites dynamic and interactive with JavaScript! You'll create features and stand-alone applications. This module includes projects where you wil... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20220619133130_change_url_to_github_path.rb | db/migrate/20220619133130_change_url_to_github_path.rb | class ChangeUrlToGithubPath < ActiveRecord::Migration[6.1]
def change
rename_column :lessons, :url, :github_path
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20230728225009_rename_lessons_has_preview_column_name.rb | db/migrate/20230728225009_rename_lessons_has_preview_column_name.rb | class RenameLessonsHasPreviewColumnName < ActiveRecord::Migration[7.0]
def change
rename_column :lessons, :has_live_preview, :previewable
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240726181456_add_reactivated_to_admin_user.rb | db/migrate/20240726181456_add_reactivated_to_admin_user.rb | # rubocop:disable Rails/ReversibleMigration
class AddReactivatedToAdminUser < ActiveRecord::Migration[7.0]
def change
execute <<-SQL.squish
ALTER TYPE status RENAME TO admin_user_status;
ALTER TYPE admin_user_status RENAME VALUE 'active' TO 'activated';
ALTER TYPE admin_user_status ADD VALUE 'pe... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20230805091337_rename_votes_table_to_likes.rb | db/migrate/20230805091337_rename_votes_table_to_likes.rb | class RenameVotesTableToLikes < ActiveRecord::Migration[7.0]
def up
rename_table :votes, :likes
rename_column :likes, :votable_id, :likeable_id
rename_column :likes, :votable_type, :likeable_type
rename_column :likes, :voter_id, :user_id
change_column_null :likes, :likeable_id, false # rubocop:d... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240730080010_add_admin_user_to_announcement.rb | db/migrate/20240730080010_add_admin_user_to_announcement.rb | class AddAdminUserToAnnouncement < ActiveRecord::Migration[7.0]
def change
add_reference :announcements, :admin_user, foreign_key: true, index: true
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20220414212627_rename_announcements_expires_column.rb | db/migrate/20220414212627_rename_announcements_expires_column.rb | class RenameAnnouncementsExpiresColumn < ActiveRecord::Migration[6.1]
def change
rename_column :announcements, :expires, :expires_at
change_column_null :announcements, :expires_at, false
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240806175334_drop_admin_comments_table.rb | db/migrate/20240806175334_drop_admin_comments_table.rb | class DropAdminCommentsTable < ActiveRecord::Migration[7.0]
def change
drop_table :active_admin_comments # rubocop:disable Rails/ReversibleMigration
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240805080849_rename_flag_admin_user_to_resolved_by.rb | db/migrate/20240805080849_rename_flag_admin_user_to_resolved_by.rb | class RenameFlagAdminUserToResolvedBy < ActiveRecord::Migration[7.0]
def change
remove_column :flags, :resolved_by_id, :integer
rename_column :flags, :admin_user_id, :resolved_by_id
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20230115072941_add_index_to_announcements_expires_at.rb | db/migrate/20230115072941_add_index_to_announcements_expires_at.rb | class AddIndexToAnnouncementsExpiresAt < ActiveRecord::Migration[6.1]
def change
add_index :announcements, :expires_at
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240719045454_create_user_sign_ups_day_stats.rb | db/migrate/20240719045454_create_user_sign_ups_day_stats.rb | class CreateUserSignUpsDayStats < ActiveRecord::Migration[7.0]
def change
create_view :user_sign_ups_day_stats, materialized: true
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20220917151628_add_learn_more_url_to_announcements.rb | db/migrate/20220917151628_add_learn_more_url_to_announcements.rb | class AddLearnMoreUrlToAnnouncements < ActiveRecord::Migration[6.1]
def change
add_column :announcements, :learn_more_url, :string
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240723092601_remove_deactivated_by_from_admin_users.rb | db/migrate/20240723092601_remove_deactivated_by_from_admin_users.rb | class RemoveDeactivatedByFromAdminUsers < ActiveRecord::Migration[7.0]
def change
remove_column :admin_users, :deactivated_by_id, :bigint
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240730082143_remove_reactivated_by_from_admin_user.rb | db/migrate/20240730082143_remove_reactivated_by_from_admin_user.rb | class RemoveReactivatedByFromAdminUser < ActiveRecord::Migration[7.0]
def change
remove_column :admin_users, :reactivated_by_id, :bigint
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240801070241_add_roles_to_admin_users.rb | db/migrate/20240801070241_add_roles_to_admin_users.rb | class AddRolesToAdminUsers < ActiveRecord::Migration[7.0]
def change
create_enum :admin_roles, %w[moderator maintainer core]
add_column :admin_users, :role, :enum, enum_type: :admin_roles
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20230527165350_create_flipper_tables.rb | db/migrate/20230527165350_create_flipper_tables.rb | class CreateFlipperTables < ActiveRecord::Migration[7.0]
def self.up
create_table :flipper_features do |t|
t.string :key, null: false
t.timestamps null: false
end
add_index :flipper_features, :key, unique: true
create_table :flipper_gates do |t|
t.string :feature_key, null: false
... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20210824201230_add_discard_at_to_project_submissions.rb | db/migrate/20210824201230_add_discard_at_to_project_submissions.rb | class AddDiscardAtToProjectSubmissions < ActiveRecord::Migration[6.1]
def change
add_column :project_submissions, :discard_at, :datetime
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20230727150759_change_reason_column_name_to_extra.rb | db/migrate/20230727150759_change_reason_column_name_to_extra.rb | class ChangeReasonColumnNameToExtra < ActiveRecord::Migration[7.0]
def change
rename_column :flags, :reason, :extra
change_column_null :flags, :extra, true
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240713134127_add_users_counter_to_paths.rb | db/migrate/20240713134127_add_users_counter_to_paths.rb | class AddUsersCounterToPaths < ActiveRecord::Migration[7.0]
def up
add_column :paths, :users_count, :integer, default: 0
Path.find_each do |path|
Path.reset_counters(path.id, :users)
end
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240802085933_add_null_constraint_to_admin_user_role.rb | db/migrate/20240802085933_add_null_constraint_to_admin_user_role.rb | class AddNullConstraintToAdminUserRole < ActiveRecord::Migration[7.0]
def change
change_column_null :admin_users, :role, false
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20220317005333_add_short_title_to_paths.rb | db/migrate/20220317005333_add_short_title_to_paths.rb | class AddShortTitleToPaths < ActiveRecord::Migration[6.1]
def change
add_column :paths, :short_title, :string
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20210622162155_add_course_id_to_lessons.rb | db/migrate/20210622162155_add_course_id_to_lessons.rb | class AddCourseIdToLessons < ActiveRecord::Migration[6.1]
def change
add_reference :lessons, :course, index: true
add_foreign_key :lessons, :courses
remove_index :lessons, %i[identifier_uuid section_id], unique: true
add_index :lessons, %i[identifier_uuid course_id], unique: true
sql = %(
... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20220915061812_remove_user_confirmation_columns.rb | db/migrate/20220915061812_remove_user_confirmation_columns.rb | class RemoveUserConfirmationColumns < ActiveRecord::Migration[6.1]
def change
remove_columns :users, :confirmation_token, :confirmed_at, :confirmation_sent_at, :unconfirmed_email # rubocop:disable Rails/ReversibleMigration
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240806061546_rename_flag_taken_action_to_action_taken.rb | db/migrate/20240806061546_rename_flag_taken_action_to_action_taken.rb | class RenameFlagTakenActionToActionTaken < ActiveRecord::Migration[7.0]
def change
rename_column :flags, :taken_action, :action_taken
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20220504125616_add_show_on_homepage_flag_and_badge_uri_to_courses.rb | db/migrate/20220504125616_add_show_on_homepage_flag_and_badge_uri_to_courses.rb | class AddShowOnHomepageFlagAndBadgeUriToCourses < ActiveRecord::Migration[6.1]
def change
add_column :courses, :show_on_homepage, :boolean, default: false, null: false # rubocop:disable Rails/BulkChangeTable
add_column :courses, :badge_uri, :string
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20220618032614_add_null_constraint_to_course_badge_uri.rb | db/migrate/20220618032614_add_null_constraint_to_course_badge_uri.rb | class AddNullConstraintToCourseBadgeUri < ActiveRecord::Migration[6.1]
def change
change_column_null :courses, :badge_uri, false
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240720081643_add_devise_two_factor_to_admin_users.rb | db/migrate/20240720081643_add_devise_two_factor_to_admin_users.rb | class AddDeviseTwoFactorToAdminUsers < ActiveRecord::Migration[7.0]
def change
add_column :admin_users, :otp_secret, :string # rubocop:disable Rails/BulkChangeTable
add_column :admin_users, :consumed_timestep, :integer
add_column :admin_users, :otp_required_for_login, :boolean, default: false # rubocop:di... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20220621121447_add_created_by_to_announcements.rb | db/migrate/20220621121447_add_created_by_to_announcements.rb | class AddCreatedByToAnnouncements < ActiveRecord::Migration[6.1]
def change
add_reference :announcements, :user, foreign_key: true
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20230122034121_create_active_storage_variant_records.active_storage.rb | db/migrate/20230122034121_create_active_storage_variant_records.active_storage.rb | # This migration comes from active_storage (originally 20191206030411)
class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0]
def change
return unless table_exists?(:active_storage_blobs)
# Use Active Record's configured type for primary key
create_table :active_storage_variant_records, i... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240626164023_add_status_to_admin_users.rb | db/migrate/20240626164023_add_status_to_admin_users.rb | class AddStatusToAdminUsers < ActiveRecord::Migration[7.0]
def change
create_enum :status, %w[pending active deactivated]
add_column :admin_users, :status, :enum, enum_type: :status, default: 'pending', null: false
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240117115443_add_lesson_and_project_counts_to_courses.rb | db/migrate/20240117115443_add_lesson_and_project_counts_to_courses.rb | class AddLessonAndProjectCountsToCourses < ActiveRecord::Migration[7.0]
def change
add_column :courses, :lessons_count, :integer, default: 0, null: false # rubocop:disable Rails/BulkChangeTable
add_column :courses, :projects_count, :integer, default: 0, null: false
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240723065559_create_activities.rb | db/migrate/20240723065559_create_activities.rb | # frozen_string_literal: true
# Migration responsible for creating a table with activities
class CreateActivities < ActiveRecord::Migration[6.1]
def self.up
create_table :activities do |t|
t.belongs_to :trackable, polymorphic: true
t.belongs_to :owner, polymorphic: true
t.string :key
t.js... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240116224504_add_sort_indexes_to_project_submissions.rb | db/migrate/20240116224504_add_sort_indexes_to_project_submissions.rb | class AddSortIndexesToProjectSubmissions < ActiveRecord::Migration[7.0]
def change
add_index :project_submissions, :created_at
add_index :project_submissions, :likes_count
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20250215230251_create_interview_concepts.rb | db/migrate/20250215230251_create_interview_concepts.rb | class CreateInterviewConcepts < ActiveRecord::Migration[7.1]
def change
create_table :interview_concepts do |t|
t.string :name, null: false
t.timestamps
end
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20210809213014_add_title_to_notifications.rb | db/migrate/20210809213014_add_title_to_notifications.rb | class AddTitleToNotifications < ActiveRecord::Migration[6.1]
def change
add_column :notifications, :title, :string, null: false # rubocop:disable Rails/NotNullColumn
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20250215224143_create_interview_surveys.rb | db/migrate/20250215224143_create_interview_surveys.rb | class CreateInterviewSurveys < ActiveRecord::Migration[7.1]
def change
create_table :interview_surveys do |t|
t.references :user, null: false, foreign_key: true
t.date :interview_date, null: false
t.timestamps
end
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240704102438_add_deactivated_to_admin_users.rb | db/migrate/20240704102438_add_deactivated_to_admin_users.rb | class AddDeactivatedToAdminUsers < ActiveRecord::Migration[7.0]
def change
add_column :admin_users, :deactivated_at, :datetime
add_reference :admin_users, :deactivated_by, foreign_key: { to_table: :admin_users }
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20231121083403_create_admin_users.rb | db/migrate/20231121083403_create_admin_users.rb | class CreateAdminUsers < ActiveRecord::Migration[7.0]
def change
create_table :admin_users do |t|
## Database authenticatable
t.string :name, null: false, default: ''
t.string :email, null: false, default: ''
t.string :encrypted_password, null: false, default: ''
## Recoverable
... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20230727150907_add_reason_enum_to_flags.rb | db/migrate/20230727150907_add_reason_enum_to_flags.rb | class AddReasonEnumToFlags < ActiveRecord::Migration[7.0]
def change
add_column :flags, :reason, :integer, null: false, default: 4
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240530151357_change_flipper_gates_value_to_text.rb | db/migrate/20240530151357_change_flipper_gates_value_to_text.rb | # frozen_string_literal: true
class ChangeFlipperGatesValueToText < ActiveRecord::Migration[7.0]
def up
# Ensure this incremental update migration is idempotent
return unless connection.column_exists? :flipper_gates, :value, :string
if index_exists? :flipper_gates, %i[feature_key key value]
remove... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240806054115_rename_announcement_admin_user.rb | db/migrate/20240806054115_rename_announcement_admin_user.rb | class RenameAnnouncementAdminUser < ActiveRecord::Migration[7.0]
def change
remove_column :announcements, :user_id, :bigint
rename_column :announcements, :admin_user_id, :created_by_id
change_column_null :announcements, :created_by_id, false
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240709052504_add_reactivation_to_admin_user.rb | db/migrate/20240709052504_add_reactivation_to_admin_user.rb | class AddReactivationToAdminUser < ActiveRecord::Migration[7.0]
def change
add_column :admin_users, :reactivated_at, :datetime
add_reference :admin_users, :reactivated_by, foreign_key: { to_table: :admin_users }
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20220413201217_rename_admin_flashes_to_announcements.rb | db/migrate/20220413201217_rename_admin_flashes_to_announcements.rb | class RenameAdminFlashesToAnnouncements < ActiveRecord::Migration[6.1]
def change
rename_table :admin_flashes, :announcements
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240817132923_remove_admin_from_users.rb | db/migrate/20240817132923_remove_admin_from_users.rb | class RemoveAdminFromUsers < ActiveRecord::Migration[7.0]
def change
remove_column :users, :admin, :boolean
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20230805091107_rename_project_submissions_cached_votes_total.rb | db/migrate/20230805091107_rename_project_submissions_cached_votes_total.rb | class RenameProjectSubmissionsCachedVotesTotal < ActiveRecord::Migration[7.0]
def change
rename_column :project_submissions, :cached_votes_total, :likes_count
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20210712195824_add_url_and_message_to_notifications.rb | db/migrate/20210712195824_add_url_and_message_to_notifications.rb | class AddUrlAndMessageToNotifications < ActiveRecord::Migration[6.1]
def change
add_column :notifications, :url, :string, null: false # rubocop:disable Rails/BulkChangeTable, Rails/NotNullColumn
add_column :notifications, :message, :text, null: false # rubocop:disable Rails/NotNullColumn
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20220706080835_add_null_constraint_to_path_badge_uri.rb | db/migrate/20220706080835_add_null_constraint_to_path_badge_uri.rb | class AddNullConstraintToPathBadgeUri < ActiveRecord::Migration[6.1]
def change
change_column_null :paths, :badge_uri, false
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20250215230748_create_interview_survey_concepts.rb | db/migrate/20250215230748_create_interview_survey_concepts.rb | class CreateInterviewSurveyConcepts < ActiveRecord::Migration[7.1]
def change
create_table :interview_survey_concepts do |t|
t.references :interview_survey, null: false, foreign_key: true
t.references :interview_concept, null: false, foreign_key: true
t.timestamps
end
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20221014124812_create_contents.rb | db/migrate/20221014124812_create_contents.rb | class CreateContents < ActiveRecord::Migration[6.1]
def change
create_table :contents do |t|
t.text :body, null: false
t.belongs_to :lesson, foreign_key: true, null: false
t.timestamps
end
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20221021183414_create_lesson_previews.rb | db/migrate/20221021183414_create_lesson_previews.rb | class CreateLessonPreviews < ActiveRecord::Migration[6.1]
def change
create_table :lesson_previews, id: :uuid do |t|
t.text :content, null: false
t.timestamps
end
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20250212143446_add_search_ts_vector_column_to_users.rb | db/migrate/20250212143446_add_search_ts_vector_column_to_users.rb | # rubocop:disable Rails/ReversibleMigration
class AddSearchTsVectorColumnToUsers < ActiveRecord::Migration[7.1]
disable_ddl_transaction!
def change
execute <<-SQL.squish
ALTER TABLE users
ADD COLUMN search_tsvector tsvector GENERATED ALWAYS AS (
setweight(to_tsvector('english', coalesce(ema... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20221014130631_remove_content_from_lessons.rb | db/migrate/20221014130631_remove_content_from_lessons.rb | class RemoveContentFromLessons < ActiveRecord::Migration[6.1]
def change
remove_columns :lessons, :content, type: :text
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20230122034120_add_service_name_to_active_storage_blobs.active_storage.rb | db/migrate/20230122034120_add_service_name_to_active_storage_blobs.active_storage.rb | # This migration comes from active_storage (originally 20190112182829)
class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0]
def up
return unless table_exists?(:active_storage_blobs)
unless column_exists?(:active_storage_blobs, :service_name)
add_column :active_storage_blobs, :service... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20230122034122_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb | db/migrate/20230122034122_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb | # This migration comes from active_storage (originally 20211119233751)
class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0]
def change
return unless table_exists?(:active_storage_blobs)
change_column_null(:active_storage_blobs, :checksum, true)
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240729171320_add_admin_user_foreign_key_to_flags.rb | db/migrate/20240729171320_add_admin_user_foreign_key_to_flags.rb | class AddAdminUserForeignKeyToFlags < ActiveRecord::Migration[7.0]
def change
add_reference :flags, :admin_user, foreign_key: true, index: true
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20220129182526_add_installation_lesson_column_to_lessons.rb | db/migrate/20220129182526_add_installation_lesson_column_to_lessons.rb | class AddInstallationLessonColumnToLessons < ActiveRecord::Migration[6.1]
def change
add_column :lessons, :installation_lesson, :boolean, default: false # rubocop:disable Rails/ThreeStateBooleanColumn
add_index :lessons, :installation_lesson
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240705122456_create_all_lesson_completions_day_stats.rb | db/migrate/20240705122456_create_all_lesson_completions_day_stats.rb | class CreateAllLessonCompletionsDayStats < ActiveRecord::Migration[7.0]
def change
create_view :all_lesson_completions_day_stats, materialized: true
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20220702170539_add_badge_uri_to_paths.rb | db/migrate/20220702170539_add_badge_uri_to_paths.rb | class AddBadgeUriToPaths < ActiveRecord::Migration[6.1]
def change
add_column :paths, :badge_uri, :string
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240622210239_devise_invitable_add_to_admin_users.rb | db/migrate/20240622210239_devise_invitable_add_to_admin_users.rb | class DeviseInvitableAddToAdminUsers < ActiveRecord::Migration[7.0]
def up
change_table :admin_users do |t| # rubocop:disable Rails/BulkChangeTable
t.string :invitation_token
t.datetime :invitation_created_at
t.datetime :invitation_sent_at
t.datetime :invitation_accepted_at
... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20211229150146_remove_banned_from_project_submission.rb | db/migrate/20211229150146_remove_banned_from_project_submission.rb | class RemoveBannedFromProjectSubmission < ActiveRecord::Migration[6.1]
def change
remove_column :project_submissions, :banned # rubocop:disable Rails/ReversibleMigration
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/db/migrate/20240712073547_create_path_lesson_completions_day_stats.rb | db/migrate/20240712073547_create_path_lesson_completions_day_stats.rb | class CreatePathLessonCompletionsDayStats < ActiveRecord::Migration[7.0]
def change
create_view :path_lesson_completions_day_stats, materialized: true
end
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/spec/rails_helper.rb | spec/rails_helper.rb | if ENV.fetch('COVERAGE', false)
require 'simplecov'
SimpleCov.start 'rails'
end
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../config/environment', __dir__)
abort('The Rails environment is running in production mode!') if Rails.env.production?
require 'rspec/rails'
Rails.root.glob('spec/support/**/*.r... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/spec/factory_bot_spec.rb | spec/factory_bot_spec.rb | require 'rails_helper'
describe FactoryBot do
it { described_class.lint traits: true } # rubocop: disable RSpec/NoExpectationExample
end
| ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/spec/seeds/test_users_and_admins_spec.rb | spec/seeds/test_users_and_admins_spec.rb | require 'rails_helper'
RSpec.describe 'Generating test users and admins' do
context 'when development environment' do
before do
allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new('development'))
end
it 'creates test users' do
load './db/seeds/test_users_and_admins.rb'... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/spec/tasks/curriculum_spec.rb | spec/tasks/curriculum_spec.rb | require 'rails_helper'
require 'rake'
describe ':curriculum' do
before do
allow($stdout).to receive(:write)
Rake.application.rake_require 'tasks/curriculum'
Rake::Task.define_task(:environment)
end
describe 'curriculum:update_content' do
let!(:lesson) do
create(
:lesson,
gi... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/spec/tasks/lesson_previews_spec.rb | spec/tasks/lesson_previews_spec.rb | require 'rails_helper'
require 'rake'
describe ':project_submissions' do
before do
Rake.application.rake_require 'tasks/lesson_previews'
Rake::Task.define_task(:environment)
end
describe 'lesson_previews:destroy_expired' do
let(:run_task) do
Rake::Task['lesson_previews:destroy_expired'].reenab... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/spec/tasks/project_submissions_spec.rb | spec/tasks/project_submissions_spec.rb | require 'rails_helper'
require 'rake'
describe ':project_submissions' do
before do
Rake.application.rake_require 'tasks/project_submissions'
Rake::Task.define_task(:environment)
end
let(:project_submissions_discard) do
Rake::Task['project_submissions:discard'].reenable
Rake.application.invoke_t... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/spec/jobs/discard_project_submission_job_spec.rb | spec/jobs/discard_project_submission_job_spec.rb | require 'rails_helper'
RSpec.describe DiscardProjectSubmissionJob do
subject(:job) { described_class.new }
describe '#perform' do
context "when the project_submission hasn't been updated for more than 7 days" do
let!(:project_submission) { create(:project_submission, discard_at: 7.days.from_now) }
... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/spec/jobs/destroy_expired_lesson_previews_job_spec.rb | spec/jobs/destroy_expired_lesson_previews_job_spec.rb | require 'rails_helper'
RSpec.describe DestroyExpiredLessonPreviewsJob do
subject(:job) { described_class.new }
describe '#perform' do
context 'when there are expired lesson previews' do
it 'deletes 3 expired lesson previews' do
create_list(:lesson_preview, 3, created_at: 1.month.ago)
ex... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/spec/jobs/refresh_materialized_views_job_spec.rb | spec/jobs/refresh_materialized_views_job_spec.rb | require 'rails_helper'
RSpec.describe RefreshMaterializedViewsJob do
subject(:job) { described_class.new }
describe '#perform' do
before do
allow(Reports::AllLessonCompletionsDayStat).to receive(:refresh)
allow(Reports::PathLessonCompletionsDayStat).to receive(:refresh)
allow(Reports::UserSi... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
TheOdinProject/theodinproject | https://github.com/TheOdinProject/theodinproject/blob/bc97027b6e48d5197a4e88f4b05b9c4341c19b3a/spec/jobs/lessons/update_content_job_spec.rb | spec/jobs/lessons/update_content_job_spec.rb | require 'rails_helper'
RSpec.describe Lessons::UpdateContentJob do
subject(:job) { described_class.new }
describe '#perform' do
it 'updates the content of the lessons' do
lesson_one = create(:lesson, github_path: '/lesson_one_github_url')
lesson_two = create(:lesson, github_path: '/lesson_two_gith... | ruby | MIT | bc97027b6e48d5197a4e88f4b05b9c4341c19b3a | 2026-01-04T15:46:55.521218Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.